Skip to content

Commit 83dd39e

Browse files
Mee-guminggo
authored andcommitted
remove unneeded codes (#20126)
was removed from Sprite3D. Should not be call from lua.
1 parent 96ae05d commit 83dd39e

File tree

1 file changed

+0
-31
lines changed

1 file changed

+0
-31
lines changed

tests/lua-tests/src/Camera3DTest/Camera3DTest.lua

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -731,37 +731,6 @@ function FogTestDemo:createLayer3D()
731731

732732
local attributes = self._shader1:getProgram():getActiveAttributes();
733733

734-
--pass mesh's attribute to shader
735-
local attributeNames =
736-
{
737-
"a_position",
738-
"a_color",
739-
"a_texCoord",
740-
"a_texCoord1",
741-
"a_texCoord2",
742-
"a_texCoord3",
743-
"a_normal",
744-
"a_blendWeight",
745-
"a_blendIndex",
746-
}
747-
---- update vertex layout of sprite3d -1
748-
local offset = 0
749-
local attributeCount = self._sprite3D1:getMesh():getMeshVertexAttribCount()
750-
local vertexLayout = ccb.VertexLayout:new()
751-
for i = 1, attributeCount do
752-
local meshattribute = self._sprite3D1:getMesh():getMeshVertexAttribute(i - 1)
753-
local attrName = attributeNames[meshattribute.vertexAttrib+1]
754-
755-
if (attributes[attrName] ~= nil) then
756-
vertexLayout:setAttribute(attrName, attributes[attrName].location, meshattribute.type, offset, false)
757-
end
758-
offset = offset + meshattribute.attribSizeBytes
759-
end
760-
761-
vertexLayout:setLayout(offset, ccb.VertexStepMode.VERTEX)
762-
self._sprite3D1:setVertexLayout(vertexLayout)
763-
self._sprite3D2:setVertexLayout(vertexLayout)
764-
765734
self._shader1:setUniform("u_fogColor", cc.bytearray.from_vec4(cc.vec4(0.5,0.5,0.5,1.0)))
766735
self._shader1:setUniform("u_fogStart",cc.bytearray.from_float(10))
767736
self._shader1:setUniform("u_fogEnd",cc.bytearray.from_float(60))

0 commit comments

Comments
 (0)