We were previously performing a redundant 'self.hit_test_shape'
call in 'avm2_mouse_pick'. All of the logic in that function
is handled in `avm2_mouse_pick.` Additionally, this call happened
before we tested out children, which would result in us targeting
a parent's drawing instead of aa child.
Surprisingly, Flash allows mutliple classes in an inheritance chain
to hav a linked `class_symbol`. When we instantiate a `DisplayObject`,
we need to stop at the first such `class_symbol` we find. This means
that any fields set from named children will *only* be set in the
first class we find, not in any of the parent classes (as their
corresponding library symbol will not be instantiated).
Previously, we would continue looping even after we found a
`class_symbol`, resulting in the furthest ancestor *winning*
the `set_object2` call.
This is a very large diff, but most of it comes from test files and
output.
This PR ads partial support for the following Stage3D shader features:
* Normal (square), rectangle, and cube textures
* Varying and temporary registers
* Lots of opcodes
The combination of these allows us to get a raytracing program
fully working in Ruffle. I've included it as image test.
Currently, this test is very slow (about 90 seconds on my machine),
as the code I'm using (https://github.com/saharan/OGSL) includes
its own shader language and compiler. THe raytracing demo
first compiles its own shader language to AGAL, and then starts
rendering the scene.
Limitations:
* Many opcodes are still unimplemented
* Most non-default texture options (e.g. mipmaps) are not implemented
We were previously calling `get_property` to determine if a `toJSON`
property exists, but that produces an error if the method is missing
on a sealed class.
Additionally, JSON serialization wasn't taking into account properties
from the vtable. All public properties (including fields, const fields,
and getter methods) get serialized.
Unfortunately, our vtable property order currently doesn't match
Flash's. I've hand-edited the test output for now (all of the actual
properties are there, just in a different order), and added a note
This includes all of the XML elements described in 'describeType' docs.
Unfortunately, the order of elements produced by Flash depends on
the iteration order of internal hashtables. As a result, the test
manually stringifies an XML object, sorting the stringified children,
to produce consistent output between Flash and Ruffle.