<!DOCTYPE html>
<html lang="en">
<head>
<title>three.js canvas - interactive - voxel painter</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
<style>
body {
font-family: Monospace;
background-color: #f0f0f0;
margin: 0px;
overflow: hidden;
}
</style>
</head>
<body>
<script src="../build/three.js"></script>
<script src="js/renderers/Projector.js"></script>
This file has been truncated. show original
Is there any simple example to rotate a 3D object just like 3DS Max?
Do you want to rotate the entire scene or just a selected 3D object?
2 Likes
I want to rotate the painted blocks and the underlying grids, such that I can view the blocks from different perspective and add a new block easily if the target position is behind the painted blocks.
I made a simple rotation version which can rotate by y axis, but currently after rotation, I cannot add or remove blocks correctly.
<!DOCTYPE html>
<html lang="en">
<head>
<title>Block builder and viewer by LiYajun</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
<style>
body {
font-family: Monospace;
background-color: #f0f0f0;
margin: 0px;
overflow: hidden;
}
</style>
</head>
<body>
<script src="../build/three.js"></script>
<script src="js/renderers/Projector.js"></script>
This file has been truncated. show original
Please put a fiddle together. It’s much easier to test your stuff in this way.
1 Like
Thanks for your kind help.
Finally I made a workable version as fiddle .
The main changes include point and surface normal rotation by y axis and the method to sync the rotations between old voxels and the newly added voxel.
Your advice and comments are warmly welcome.
1 Like