-
Notifications
You must be signed in to change notification settings - Fork 0
SVG and javascript
My plan was to dynamical load vector-graphics and combine them to an image just like you can stack multiple images in css-background.
With the svg-<use> command it should be possible to combine the separatly loaded svg into one scene.
But I run into several problems here:
- svg can be loaded via
<img>but then you cannot access each component of svg for re-styling - you can either inline-embedd an SVG in html or use to load dynamical from a path
- first one is ugly to edit (copy paste from svg-file)
- both are creating a visible image; but I just want to get the svg loaded to be able to them
- I CANNOT access contentDocument (opposed to the many examples out there) from the loaded svg inside because of cross-origin-blocking for local files !
So my current workaround is like this:
- create a js-function that builds a svg-html for each picture (copy paste svg-code from svg-file into function)
- those function are called and the svg-html is printed inside a
<div>that is hidden - the scene can now
<use>those svg-html because it exists in the html-document
Todo: how to load a svg-file from disk and append its content to <symbol>-container of scene-svg?
What is twine and interactive fiction
Exampl. SuperSimpleStory
What are storyformats
Why snowman
Setup tweego and snowman
Switching between Tweego and Twine
Snowman template methods
Snowman markup
javascript usage
debugging your story
Common issues with template methods and scripting
Story Telling in general
General concepts for IF
Scenes & Sequels
Designing Puzzles
See here about my js-framework running in snowman:
==> problems & solutions <==