Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F182380
SceneUtils.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
646 B
Subscribers
None
SceneUtils.js
View Options
/**
* @author alteredq / http://alteredqualia.com/
*/
THREE
.
SceneUtils
=
{
createMultiMaterialObject
:
function
(
geometry
,
materials
)
{
var
group
=
new
THREE
.
Group
();
for
(
var
i
=
0
,
l
=
materials
.
length
;
i
<
l
;
i
++
)
{
group
.
add
(
new
THREE
.
Mesh
(
geometry
,
materials
[
i
]
)
);
}
return
group
;
},
detach
:
function
(
child
,
parent
,
scene
)
{
child
.
applyMatrix
(
parent
.
matrixWorld
);
parent
.
remove
(
child
);
scene
.
add
(
child
);
},
attach
:
function
(
child
,
scene
,
parent
)
{
child
.
applyMatrix
(
new
THREE
.
Matrix4
().
getInverse
(
parent
.
matrixWorld
)
);
scene
.
remove
(
child
);
parent
.
add
(
child
);
}
};
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Jun 16, 8:52 PM (1 d, 21 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34406
Attached To
rTDCWEB 3DCycles Web
Event Timeline
Log In to Comment