Add files via upload
This commit is contained in:
18 files changed
+12656
No files matched your search
+25
@@ -0,0 +1,25 @@
|
||||
# Credits and bundled assets
|
||||
|
||||
Flipnote Editor was developed for RexiMemo by Rekushi. This standalone edition
|
||||
retains its interface, drawing tools and artwork. Original editor code is
|
||||
covered by the accompanying GNU AGPL version 3 licence.
|
||||
|
||||
Thanks to **bizkit** and **CommandCreep** for creating sprites for the editor.
|
||||
|
||||
## Dependencies
|
||||
|
||||
- **flipnote.js**, James Daniel. MIT licence. The unminified browser build is
|
||||
bundled in `assets/vendor/flipnote.js`; its licence is beside it. Used here
|
||||
to read PPM files, not to write them.
|
||||
Source: https://github.com/jaames/flipnote.js
|
||||
- **bidi-js**. MIT licence, retained at
|
||||
`assets/flipnote-editor/bidi-LICENSE.txt`.
|
||||
- The Arabic joining algorithm follows **arabic-reshaper**. Its MIT licence is
|
||||
retained at `assets/flipnote-editor/arabic-reshaper-LICENSE.txt`.
|
||||
|
||||
## Artwork
|
||||
|
||||
The original interface assets are included so this copy looks like the editor.
|
||||
|
||||
Nintendo's names and Flipnote Studio are used to describe compatibility. This
|
||||
project is independent of Nintendo.
|
||||
@@ -0,0 +1,661 @@
|
||||
GNU AFFERO GENERAL PUBLIC LICENSE
|
||||
Version 3, 19 November 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU Affero General Public License is a free, copyleft license for
|
||||
software and other kinds of works, specifically designed to ensure
|
||||
cooperation with the community in the case of network server software.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
our General Public Licenses are intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
Developers that use our General Public Licenses protect your rights
|
||||
with two steps: (1) assert copyright on the software, and (2) offer
|
||||
you this License which gives you legal permission to copy, distribute
|
||||
and/or modify the software.
|
||||
|
||||
A secondary benefit of defending all users' freedom is that
|
||||
improvements made in alternate versions of the program, if they
|
||||
receive widespread use, become available for other developers to
|
||||
incorporate. Many developers of free software are heartened and
|
||||
encouraged by the resulting cooperation. However, in the case of
|
||||
software used on network servers, this result may fail to come about.
|
||||
The GNU General Public License permits making a modified version and
|
||||
letting the public access it on a server without ever releasing its
|
||||
source code to the public.
|
||||
|
||||
The GNU Affero General Public License is designed specifically to
|
||||
ensure that, in such cases, the modified source code becomes available
|
||||
to the community. It requires the operator of a network server to
|
||||
provide the source code of the modified version running there to the
|
||||
users of that server. Therefore, public use of a modified version, on
|
||||
a publicly accessible server, gives the public access to the source
|
||||
code of the modified version.
|
||||
|
||||
An older license, called the Affero General Public License and
|
||||
published by Affero, was designed to accomplish similar goals. This is
|
||||
a different license, not a version of the Affero GPL, but Affero has
|
||||
released a new version of the Affero GPL which permits relicensing under
|
||||
this license.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU Affero General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Remote Network Interaction; Use with the GNU General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, if you modify the
|
||||
Program, your modified version must prominently offer all users
|
||||
interacting with it remotely through a computer network (if your version
|
||||
supports such interaction) an opportunity to receive the Corresponding
|
||||
Source of your version by providing access to the Corresponding Source
|
||||
from a network server at no charge, through some standard or customary
|
||||
means of facilitating copying of software. This Corresponding Source
|
||||
shall include the Corresponding Source for any work covered by version 3
|
||||
of the GNU General Public License that is incorporated pursuant to the
|
||||
following paragraph.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the work with which it is combined will remain governed by version
|
||||
3 of the GNU General Public License.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU Affero General Public License from time to time. Such new versions
|
||||
will be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU Affero General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU Affero General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU Affero General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If your software can interact with users remotely through a computer
|
||||
network, you should also make sure that it provides a way for users to
|
||||
get its source. For example, if your program is a web application, its
|
||||
interface could display a "Source" link that leads users to an archive
|
||||
of the code. There are many ways you could offer source, and different
|
||||
solutions will be better for different programs; see section 13 for the
|
||||
specific requirements.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU AGPL, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
@@ -0,0 +1,70 @@
|
||||
# Flipnote Editor
|
||||
|
||||
A browser animation editor extracted from RexiMemo. The drawing interface is
|
||||
the same: a 256×192 canvas, two ink layers, eight playback speeds, drawing and
|
||||
paint tools, selections, transforms, text, onion skin and sound tracks.
|
||||
|
||||
This version runs on its own. It has no accounts, site navigation, online
|
||||
library or server API. Files selected in the editor are read by your browser.
|
||||
They are not sent anywhere.
|
||||
|
||||
## Run it
|
||||
|
||||
With Node.js 18 or newer:
|
||||
|
||||
```sh
|
||||
npm start
|
||||
```
|
||||
|
||||
Open **http://localhost:8090**. No dependency installation or build step is
|
||||
needed. Alternatively, serve this folder with any static web server, for example:
|
||||
|
||||
```sh
|
||||
python -m http.server 8090 --bind 127.0.0.1
|
||||
```
|
||||
|
||||
Use localhost or HTTPS for microphone recording. Opening `index.html` directly
|
||||
from disk is not supported because the text renderer loads local JSON.
|
||||
For static hosting, copy the whole folder. Asset paths also work in a subdirectory.
|
||||
|
||||
## Files and audio
|
||||
|
||||
- **Tab 5 → Open .PPM** reads a Flipnote Studio file from your device, including
|
||||
its pages, ink colours, paper, hidden layers, sound effects and playback speed.
|
||||
- **Tab 4** records music and three sound effects. Hold Shift while clicking an
|
||||
audio button to import an MP3 or WAV and trim it.
|
||||
- **Tab 4 → Import Image** accepts local images and clipboard pastes.
|
||||
- **Tab 5 → Save .WEBM** renders the animation and its audio into a video.
|
||||
|
||||
PPM writing, signing and online uploads are absent. WebM is the only animation
|
||||
output. There is no editable project save format or automatic project backup;
|
||||
keep the page open until you have finished. The browser asks before closing a
|
||||
changed project. Tool preferences and keyboard shortcuts stay on your device.
|
||||
|
||||
Open the editor's settings button for zoom, the pixel grid, the desktop Shift
|
||||
button and remappable shortcuts. The pixel grid appears at 400% zoom and above.
|
||||
Text uses **Shift+T** by default.
|
||||
|
||||
## Source layout
|
||||
|
||||
| File | Purpose |
|
||||
| --- | --- |
|
||||
| `index.html` | Editor controls and dialogs |
|
||||
| `assets/editor.css` | Original editor styling and shared form rules |
|
||||
| `assets/bootstrap.js` | Asset loading, input fixes and touch Shift control |
|
||||
| `assets/flipnote-editor/editor.js` | Drawing, pages, selection, audio and video rendering |
|
||||
| `assets/flipnote-editor/drawing-engine.js` | Brush and paint behaviour |
|
||||
| `assets/flipnote-editor/text-tool.js` | Pixel text tool |
|
||||
| `assets/ppm-import.js` | Local PPM import adapter |
|
||||
| `assets/vendor/flipnote.js` | Bundled PPM decoder |
|
||||
| `tools/serve.cjs` | Optional local static file server |
|
||||
|
||||
Run `npm test` for the local import and release checks. Tests do not contact
|
||||
RexiMemo or require an account. The original RexiMemo editor is not modified by
|
||||
this standalone version.
|
||||
|
||||
## Licence
|
||||
|
||||
The editor code follows the source project's GNU AGPL version 3 licence. See
|
||||
`LICENSE`. Bundled dependencies retain their own licences. Additional credits
|
||||
are listed in `CREDITS.md`.
|
||||
Vendored
+348
@@ -0,0 +1,348 @@
|
||||
|
||||
(function(){
|
||||
var loader=document.getElementById('flipnote-editor-loader');
|
||||
var statusEl=loader&&loader.querySelector('[data-flipnote-loader-status]');
|
||||
var progressEl=loader&&loader.querySelector('.flipnote-editor-loader-progress');
|
||||
var progressFill=loader&&loader.querySelector('[data-flipnote-loader-progress]');
|
||||
var copyEl=loader&&loader.querySelector('.flipnote-editor-loader-copy');
|
||||
var titleEl=loader&&loader.querySelector('.flipnote-editor-loader-title');
|
||||
|
||||
|
||||
|
||||
|
||||
var drawingEngineScript='./assets/flipnote-editor/drawing-engine.js?v=2.47-advanced-eraser-paint-memory';
|
||||
var textToolScript='./assets/flipnote-editor/text-tool.js?v=3.26.2';
|
||||
var editorScript='./assets/flipnote-editor/editor.js?v=3.26.2-canvas';
|
||||
// The server enumerates every image in web/static/flipnote-editor on each request.
|
||||
// This means newly-added button states (including manually-added tab art) join the
|
||||
// preload automatically without needing another JavaScript manifest update.
|
||||
|
||||
// Keep a small explicit list for image assets used by the editor but stored elsewhere.
|
||||
|
||||
var imageUrls=[];
|
||||
var imageCacheBank=document.getElementById('flipnote-editor-image-cache');
|
||||
var decodedImageCache=window.__flipnoteEditorImageCache=window.__flipnoteEditorImageCache||new Map();
|
||||
document.querySelectorAll('img[src]').forEach(function(img){imageUrls.push(img.getAttribute('src'));});
|
||||
document.querySelectorAll('*').forEach(function(node){
|
||||
Array.from(node.attributes||[]).forEach(function(attr){
|
||||
if(/^data-.*src$/i.test(attr.name)&&attr.value)imageUrls.push(attr.value);
|
||||
});
|
||||
});
|
||||
imageUrls=Array.from(new Set(imageUrls.concat(["./assets/flipnote-editor/base.png","./assets/flipnote-editor/checker.png","./assets/flipnote-editor/clear.png","./assets/flipnote-editor/clone-placeholder.png","./assets/flipnote-editor/closepages.png","./assets/flipnote-editor/colour.png","./assets/flipnote-editor/copy.png","./assets/flipnote-editor/copy_pressed.png","./assets/flipnote-editor/cut.png","./assets/flipnote-editor/delete-frame.png","./assets/flipnote-editor/downloadwebm.png","./assets/flipnote-editor/Draw.png","./assets/flipnote-editor/Draw_selected.png","./assets/flipnote-editor/earsHurt.png","./assets/flipnote-editor/editpattern.png","./assets/flipnote-editor/Erase.png","./assets/flipnote-editor/erase1.png","./assets/flipnote-editor/erase1_Adv.png","./assets/flipnote-editor/erase2.png","./assets/flipnote-editor/erase2_Adv.png","./assets/flipnote-editor/erase3.png","./assets/flipnote-editor/erase3_Adv.png","./assets/flipnote-editor/erase4.png","./assets/flipnote-editor/erase4_Adv.png","./assets/flipnote-editor/erase5.png","./assets/flipnote-editor/erase5_Adv.png","./assets/flipnote-editor/erase6.png","./assets/flipnote-editor/erase6_Adv.png","./assets/flipnote-editor/erase7.png","./assets/flipnote-editor/erase7_Adv.png","./assets/flipnote-editor/erase8.png","./assets/flipnote-editor/erase8_Adv.png","./assets/flipnote-editor/eraseaudio.png","./assets/flipnote-editor/erasebig.png","./assets/flipnote-editor/eraser.png","./assets/flipnote-editor/Erase_selected.png","./assets/flipnote-editor/fill.png","./assets/flipnote-editor/fill1.png","./assets/flipnote-editor/fill2.png","./assets/flipnote-editor/fill3.png","./assets/flipnote-editor/fill4.png","./assets/flipnote-editor/fill5.png","./assets/flipnote-editor/fill6.png","./assets/flipnote-editor/fill7.png","./assets/flipnote-editor/fill8.png","./assets/flipnote-editor/fill_selected.png","./assets/flipnote-editor/filmstrip-dots.png","./assets/flipnote-editor/first-frame.png","./assets/flipnote-editor/flip_x.png","./assets/flipnote-editor/flip_y.png","./assets/flipnote-editor/goodVolume.png","./assets/flipnote-editor/ImportImage.png","./assets/flipnote-editor/invert.png","./assets/flipnote-editor/last-frame.png","./assets/flipnote-editor/layer1.png","./assets/flipnote-editor/layer1_inactive.png","./assets/flipnote-editor/layer2.png","./assets/flipnote-editor/layer2_inactive.png","./assets/flipnote-editor/lightbox-placeholder.png","./assets/flipnote-editor/lightbox.png","./assets/flipnote-editor/lightbox_pressed.png","./assets/flipnote-editor/loop_disabled.png","./assets/flipnote-editor/loop_enabled.png","./assets/flipnote-editor/musicBarEmpty.png","./assets/flipnote-editor/musicImportalt.png","./assets/flipnote-editor/musicPlay.png","./assets/flipnote-editor/musicRec.png","./assets/flipnote-editor/musicStop.png","./assets/flipnote-editor/new-frame.png","./assets/flipnote-editor/next-frame.png","./assets/flipnote-editor/openpages.png","./assets/flipnote-editor/openppm.png","./assets/flipnote-editor/pageCopy.png","./assets/flipnote-editor/pageErase.png","./assets/flipnote-editor/pageInsert.png","./assets/flipnote-editor/pagePaste.png","./assets/flipnote-editor/Paint.png","./assets/flipnote-editor/paint1.png","./assets/flipnote-editor/paint1_Adv.png","./assets/flipnote-editor/paint2.png","./assets/flipnote-editor/paint2_Adv.png","./assets/flipnote-editor/paint3.png","./assets/flipnote-editor/paint3_Adv.png","./assets/flipnote-editor/paint4.png","./assets/flipnote-editor/paint4_Adv.png","./assets/flipnote-editor/paint5.png","./assets/flipnote-editor/paint5_Adv.png","./assets/flipnote-editor/paint6.png","./assets/flipnote-editor/paint6_Adv.png","./assets/flipnote-editor/paint7.png","./assets/flipnote-editor/paint7_Adv.png","./assets/flipnote-editor/paint8.png","./assets/flipnote-editor/paint8_Adv.png","./assets/flipnote-editor/Paint_selected.png","./assets/flipnote-editor/paper-placeholder.png","./assets/flipnote-editor/paperB.png","./assets/flipnote-editor/paperW.png","./assets/flipnote-editor/paste.png","./assets/flipnote-editor/pen.png","./assets/flipnote-editor/pen1.png","./assets/flipnote-editor/pen1_Adv.png","./assets/flipnote-editor/pen2.png","./assets/flipnote-editor/pen2_Adv.png","./assets/flipnote-editor/pen3.png","./assets/flipnote-editor/pen3_Adv.png","./assets/flipnote-editor/pen4.png","./assets/flipnote-editor/pen4_Adv.png","./assets/flipnote-editor/pen5.png","./assets/flipnote-editor/pen5_Adv.png","./assets/flipnote-editor/pen6.png","./assets/flipnote-editor/pen6_Adv.png","./assets/flipnote-editor/pen7.png","./assets/flipnote-editor/pen7_Adv.png","./assets/flipnote-editor/pen8.png","./assets/flipnote-editor/pen8_Adv.png","./assets/flipnote-editor/play.png","./assets/flipnote-editor/previous-frame.png","./assets/flipnote-editor/redo.png","./assets/flipnote-editor/redo_grey.png","./assets/flipnote-editor/resize_larger.png","./assets/flipnote-editor/resize_smaller.png","./assets/flipnote-editor/rotate_anticlockwise.png","./assets/flipnLine truncated
|
||||
|
||||
var fontJobs=[{css:'16px "NDS BIOS"',sample:'Preloading assets 00 / 00'}];
|
||||
var completed=0;
|
||||
var total=imageUrls.length+fontJobs.length+5;
|
||||
function updateProgress(){
|
||||
var safeTotal=Math.max(total,1);
|
||||
var percent=Math.max(0,Math.min(100,Math.round((completed/safeTotal)*100)));
|
||||
if(statusEl)statusEl.textContent='Preloading assets '+Math.min(completed,total)+' / '+total;
|
||||
if(progressFill)progressFill.style.width=percent+'%';
|
||||
if(progressEl)progressEl.setAttribute('aria-valuenow',String(percent));
|
||||
}
|
||||
function doneOne(){completed+=1;updateProgress();}
|
||||
function preloadImage(url){
|
||||
var cached=decodedImageCache.get(url);
|
||||
if(cached&&cached.promise)return cached.promise.then(function(){doneOne();});
|
||||
var image=new Image();
|
||||
image.alt='';
|
||||
image.decoding='sync';
|
||||
image.loading='eager';
|
||||
image.setAttribute('aria-hidden','true');
|
||||
if(imageCacheBank)imageCacheBank.appendChild(image);
|
||||
var promise=new Promise(function(resolve,reject){
|
||||
var finished=false;
|
||||
var decoding=false;
|
||||
var finish=function(ok){
|
||||
if(finished)return;
|
||||
finished=true;
|
||||
if(!ok){reject(new Error('asset '+url));return;}
|
||||
resolve(image);
|
||||
};
|
||||
var decodeLoaded=function(){
|
||||
if(finished||decoding)return;
|
||||
decoding=true;
|
||||
if(typeof image.decode==='function'){
|
||||
image.decode().then(function(){finish(true);}).catch(function(){
|
||||
finish(image.complete&&image.naturalWidth>0);
|
||||
});
|
||||
}else{
|
||||
finish(image.complete&&image.naturalWidth>0);
|
||||
}
|
||||
};
|
||||
image.onload=decodeLoaded;
|
||||
image.onerror=function(){finish(false);};
|
||||
image.src=url;
|
||||
if(image.complete&&image.naturalWidth>0)decodeLoaded();
|
||||
});
|
||||
decodedImageCache.set(url,{image:image,promise:promise});
|
||||
return promise.then(function(){doneOne();});
|
||||
}
|
||||
function preloadFont(job){
|
||||
if(!document.fonts||!document.fonts.load)return Promise.reject(new Error('font loading unsupported'));
|
||||
return document.fonts.load(job.css,job.sample).then(function(faces){
|
||||
if(!faces||!faces.length)throw new Error('font '+job.css);
|
||||
doneOne();
|
||||
});
|
||||
}
|
||||
function loadFonts(){
|
||||
return Promise.all(fontJobs.map(preloadFont)).then(function(){
|
||||
if(loader)loader.classList.add('fonts-ready');
|
||||
if(copyEl)copyEl.setAttribute('aria-hidden','false');
|
||||
});
|
||||
}
|
||||
function loadScript(url,label){
|
||||
return new Promise(function(resolve,reject){
|
||||
var script=document.createElement('script');
|
||||
script.src=url;
|
||||
script.onload=function(){doneOne();resolve();};
|
||||
script.onerror=function(){reject(new Error(label||'editor script'));};
|
||||
document.body.appendChild(script);
|
||||
});
|
||||
}
|
||||
function loadEditor(){return loadScript('./assets/vendor/flipnote.js','PPM reader').then(function(){return loadScript('./assets/ppm-import.js','PPM importer');}).then(function(){return loadScript(drawingEngineScript,'drawing engine');}).then(function(){return loadScript(textToolScript,'text tool');}).then(function(){return loadScript(editorScript,'editor');});}
|
||||
function installEditorInputFixes(){
|
||||
var titleField=document.getElementById('filename');
|
||||
if(titleField&&!titleField.dataset.titleLimitFix){
|
||||
titleField.dataset.titleLimitFix='1';
|
||||
var titleLimit=80;
|
||||
function titleText(){return String(titleField.textContent||'').replace(/ /g,' ');}
|
||||
function selectionLength(){
|
||||
var selection=window.getSelection&&window.getSelection();
|
||||
if(!selection||!selection.rangeCount)return 0;
|
||||
var range=selection.getRangeAt(0);
|
||||
if(!titleField.contains(range.commonAncestorContainer))return 0;
|
||||
return range.toString().length;
|
||||
}
|
||||
function putCaretAtEnd(){
|
||||
var selection=window.getSelection&&window.getSelection();
|
||||
if(!selection)return;
|
||||
var range=document.createRange();
|
||||
range.selectNodeContents(titleField);
|
||||
range.collapse(false);
|
||||
selection.removeAllRanges();
|
||||
selection.addRange(range);
|
||||
}
|
||||
titleField.addEventListener('keydown',function(event){
|
||||
if(event.defaultPrevented||event.ctrlKey||event.metaKey||event.altKey)return;
|
||||
if(event.key&&event.key.length===1&&titleText().length-selectionLength()>=titleLimit){
|
||||
event.preventDefault();
|
||||
event.stopImmediatePropagation();
|
||||
}
|
||||
},true);
|
||||
titleField.addEventListener('beforeinput',function(event){
|
||||
if(event.defaultPrevented||!event.inputType||event.inputType.indexOf('insert')!==0)return;
|
||||
var incoming=typeof event.data==='string'?event.data:'';
|
||||
if(event.inputType==='insertLineBreak'||event.inputType==='insertParagraph'){
|
||||
event.preventDefault();
|
||||
return;
|
||||
}
|
||||
if(titleText().length-selectionLength()+(incoming?incoming.length:1)>titleLimit){
|
||||
event.preventDefault();
|
||||
}
|
||||
},true);
|
||||
titleField.addEventListener('paste',function(event){
|
||||
var clipboard=event.clipboardData||window.clipboardData;
|
||||
if(!clipboard)return;
|
||||
var incoming=String(clipboard.getData('text')||'').replace(/[\r\n]+/g,' ');
|
||||
var room=Math.max(0,titleLimit-(titleText().length-selectionLength()));
|
||||
if(incoming.length<=room)return;
|
||||
event.preventDefault();
|
||||
if(room>0){
|
||||
var partial=incoming.slice(0,room);
|
||||
if(document.execCommand)document.execCommand('insertText',false,partial);
|
||||
}
|
||||
},true);
|
||||
titleField.addEventListener('input',function(){
|
||||
var value=titleText();
|
||||
if(value.length<=titleLimit)return;
|
||||
titleField.textContent=value.slice(0,titleLimit);
|
||||
putCaretAtEnd();
|
||||
},true);
|
||||
}
|
||||
|
||||
var paperTool=document.getElementById('paper-tool');
|
||||
function pageUsesBlackPaper(){
|
||||
if(!paperTool)return false;
|
||||
if(paperTool.getAttribute('aria-pressed')==='true')return true;
|
||||
var image=paperTool.querySelector('img');
|
||||
return !!(image&&/paperB\.png(?:[?#]|$)/i.test(image.getAttribute('src')||''));
|
||||
}
|
||||
function syncMonochromeInkLabel(){
|
||||
var label=pageUsesBlackPaper()?'White':'Black';
|
||||
['flipnote-image-import-colour','flipnote-image-import-second-colour'].forEach(function(id){
|
||||
var select=document.getElementById(id);
|
||||
var option=select&&select.querySelector('option[value="black"]');
|
||||
if(option)option.textContent=label;
|
||||
});
|
||||
document.querySelectorAll('.flipnote-editor-layer-color[data-layer-color="black"]').forEach(function(button){
|
||||
var layer=Number(button.getAttribute('data-layer'))+1;
|
||||
button.title=label;
|
||||
button.setAttribute('aria-label','Layer '+layer+' '+label.toLowerCase());
|
||||
});
|
||||
}
|
||||
syncMonochromeInkLabel();
|
||||
if(paperTool&&!paperTool.dataset.rexiPaperInkLabelFix){
|
||||
paperTool.dataset.rexiPaperInkLabelFix='1';
|
||||
paperTool.addEventListener('click',function(){setTimeout(syncMonochromeInkLabel,0);});
|
||||
var paperObserver=new MutationObserver(syncMonochromeInkLabel);
|
||||
paperObserver.observe(paperTool,{attributes:true,attributeFilter:['aria-pressed','title'],subtree:true});
|
||||
var paperImage=paperTool.querySelector('img');
|
||||
if(paperImage)paperObserver.observe(paperImage,{attributes:true,attributeFilter:['src']});
|
||||
}
|
||||
|
||||
var imageImportButton=document.getElementById('flipnote-import-image-button');
|
||||
if(imageImportButton&&!imageImportButton.dataset.rexiInkLabelFix){
|
||||
imageImportButton.dataset.rexiInkLabelFix='1';
|
||||
imageImportButton.addEventListener('click',function(){setTimeout(syncMonochromeInkLabel,0);});
|
||||
}
|
||||
|
||||
var imageApply=document.getElementById('flipnote-image-import-apply');
|
||||
if(imageApply&&!imageApply.dataset.rexiImageColourFix){
|
||||
imageApply.dataset.rexiImageColourFix='1';
|
||||
imageApply.addEventListener('click',function(){
|
||||
var mode=document.getElementById('flipnote-image-import-mode');
|
||||
var first=document.getElementById('flipnote-image-import-colour');
|
||||
var second=document.getElementById('flipnote-image-import-second-colour');
|
||||
var layer=document.getElementById('flipnote-image-import-layer');
|
||||
var chosenMode=mode?mode.value:'single';
|
||||
var firstColour=first?first.value:'black';
|
||||
var secondColour=second?second.value:'red';
|
||||
var chosenLayer=Math.max(0,Math.min(1,Number(layer&&layer.value)||0));
|
||||
function applyLayerColour(index,colour){
|
||||
var button=document.querySelector('.flipnote-editor-layer-color[data-layer="'+index+'"][data-layer-color="'+colour+'"]');
|
||||
if(button)button.click();
|
||||
}
|
||||
setTimeout(function(){
|
||||
if(chosenMode==='dual'){
|
||||
applyLayerColour(0,firstColour);
|
||||
applyLayerColour(1,secondColour);
|
||||
}else{
|
||||
applyLayerColour(chosenLayer,firstColour);
|
||||
}
|
||||
syncMonochromeInkLabel();
|
||||
},0);
|
||||
},true);
|
||||
}
|
||||
}
|
||||
|
||||
function installMobileShiftToggle(){
|
||||
var button=document.getElementById('flipnote-mobile-shift-toggle');
|
||||
if(!button)return;
|
||||
var ua=String(navigator.userAgent||'');
|
||||
var uaMobile=!!(navigator.userAgentData&&navigator.userAgentData.mobile);
|
||||
var ipadLike=navigator.platform==='MacIntel'&&Number(navigator.maxTouchPoints||0)>1;
|
||||
var mobileOrTablet=uaMobile||ipadLike||/(Android|iPad|iPhone|iPod|Mobile|Tablet|Silk|Kindle)/i.test(ua);
|
||||
var desktopSetting=document.getElementById('flipnote-editor-desktop-shift');
|
||||
var desktopSettingKey='flipnote-editor.flipnote-editor.desktop-shift.v1';
|
||||
var desktopEnabled=false;
|
||||
try{desktopEnabled=window.localStorage.getItem(desktopSettingKey)==='1';}catch(_error){}
|
||||
if(desktopSetting)desktopSetting.checked=desktopEnabled;
|
||||
if(!mobileOrTablet&&desktopSetting)desktopSetting.addEventListener('change',function(){
|
||||
desktopEnabled=desktopSetting.checked;
|
||||
try{window.localStorage.setItem(desktopSettingKey,desktopEnabled?'1':'0');}catch(_error){}
|
||||
if(!desktopEnabled)setVirtualShift(false);
|
||||
button.hidden=!desktopEnabled;
|
||||
});
|
||||
|
||||
var image=button.querySelector('img');
|
||||
var normalSrc=image&&image.getAttribute('data-normal-src')||'./assets/flipnote-editor/shiftl.png';
|
||||
var activeSrc=image&&image.getAttribute('data-active-src')||'./assets/flipnote-editor/shiftl_active.png';
|
||||
var active=false;
|
||||
|
||||
function makeShiftEvent(type,down){
|
||||
var event;
|
||||
try{
|
||||
event=new KeyboardEvent(type,{key:'Shift',code:'ShiftLeft',location:1,shiftKey:!!down,bubbles:true,cancelable:true});
|
||||
}catch(_error){
|
||||
event=document.createEvent('Event');
|
||||
event.initEvent(type,true,true);
|
||||
}
|
||||
try{Object.defineProperty(event,'key',{configurable:true,get:function(){return 'Shift';}});}catch(_error){}
|
||||
try{Object.defineProperty(event,'code',{configurable:true,get:function(){return 'ShiftLeft';}});}catch(_error){}
|
||||
try{Object.defineProperty(event,'keyCode',{configurable:true,get:function(){return 16;}});}catch(_error){}
|
||||
try{Object.defineProperty(event,'which',{configurable:true,get:function(){return 16;}});}catch(_error){}
|
||||
try{Object.defineProperty(event,'shiftKey',{configurable:true,get:function(){return !!down;}});}catch(_error){}
|
||||
var target=document.body||document.documentElement||document;
|
||||
target.dispatchEvent(event);
|
||||
}
|
||||
|
||||
function setVirtualShift(next){
|
||||
next=!!next;
|
||||
if(active===next)return;
|
||||
active=next;
|
||||
button.setAttribute('aria-pressed',active?'true':'false');
|
||||
button.title=active?'Shift enabled':'Shift';
|
||||
if(image)image.src=active?activeSrc:normalSrc;
|
||||
makeShiftEvent(active?'keydown':'keyup',active);
|
||||
}
|
||||
|
||||
function forceShiftModifier(event){
|
||||
if(!active||!event)return;
|
||||
try{Object.defineProperty(event,'shiftKey',{configurable:true,get:function(){return true;}});}catch(_error){}
|
||||
if(typeof event.getModifierState==='function'){
|
||||
var original=event.getModifierState.bind(event);
|
||||
try{Object.defineProperty(event,'getModifierState',{configurable:true,value:function(key){return String(key||'').toLowerCase()==='shift'?true:original(key);}});}catch(_error){}
|
||||
}
|
||||
}
|
||||
|
||||
['pointerdown','pointerup','mousedown','mouseup','click','dblclick'].forEach(function(type){
|
||||
document.addEventListener(type,forceShiftModifier,true);
|
||||
});
|
||||
|
||||
function consumesOneShotShift(target){
|
||||
if(!target||!target.closest)return false;
|
||||
var slot=target.closest('[data-tool-slot]');
|
||||
if(slot){
|
||||
var slotImage=slot.querySelector('img');
|
||||
var slotSrc=slotImage&&String(slotImage.getAttribute('src')||'');
|
||||
return slotSrc.toLowerCase().indexOf('_adv.png')!==-1;
|
||||
}
|
||||
return !!target.closest('#copy-tool,.flipnote-editor-more-tool,[data-audio-control]');
|
||||
}
|
||||
|
||||
button.addEventListener('click',function(){setVirtualShift(!active);});
|
||||
document.addEventListener('click',function(event){
|
||||
if(!active||button.contains(event.target)||!consumesOneShotShift(event.target))return;
|
||||
window.setTimeout(function(){setVirtualShift(false);},0);
|
||||
},true);
|
||||
document.addEventListener('keyup',function(event){
|
||||
if(active&&event.key==='Shift')window.setTimeout(function(){if(active)makeShiftEvent('keydown',true);},0);
|
||||
});
|
||||
window.addEventListener('focus',function(){if(active)makeShiftEvent('keydown',true);});
|
||||
window.addEventListener('pagehide',function(){if(active)makeShiftEvent('keyup',false);});
|
||||
button.hidden=!(mobileOrTablet||desktopEnabled);
|
||||
}
|
||||
|
||||
|
||||
|
||||
function reveal(){
|
||||
updateProgress();
|
||||
document.body.classList.remove('flipnote-editor-loading');
|
||||
if(!loader)return;
|
||||
loader.classList.add('is-exiting');
|
||||
var removed=false;
|
||||
var removeLoader=function(){
|
||||
if(removed)return;
|
||||
removed=true;
|
||||
loader.remove();
|
||||
};
|
||||
loader.addEventListener('transitionend',function(event){
|
||||
if(event.target===loader&&event.propertyName==='transform')removeLoader();
|
||||
});
|
||||
window.setTimeout(removeLoader,900);
|
||||
}
|
||||
function fail(error){ if(loader)loader.classList.add('load-failed'); if(titleEl)titleEl.textContent='Flipnote Editor could not load'; if(statusEl)statusEl.textContent=error&&error.message?error.message:'Try refreshing the page.'; }
|
||||
updateProgress();
|
||||
var imageJobs=imageUrls.map(preloadImage);
|
||||
var fontPromise=loadFonts();
|
||||
|
||||
function settleDecodedImages(){
|
||||
return new Promise(function(resolve){
|
||||
requestAnimationFrame(function(){requestAnimationFrame(resolve);});
|
||||
});
|
||||
}
|
||||
|
||||
Promise.all(imageJobs.concat([fontPromise])).then(settleDecodedImages).then(loadEditor).then(function(){installEditorInputFixes();installMobileShiftToggle();return settleDecodedImages();}).then(reveal).catch(fail);
|
||||
})();
|
||||
|
||||
+2462
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="240" height="240" viewBox="0 0 240 240">
|
||||
<path fill="#AE301F" fill-rule="evenodd" d="M64,48 L88,48 C96.836556,48 104,55.163444 104,64 L104,176 C104,184.836556 96.836556,192 88,192 L64,192 C55.163444,192 48,184.836556 48,176 L48,64 C48,55.163444 55.163444,48 64,48 Z M152,48 L176,48 C184.836556,48 192,55.163444 192,64 L192,176 C192,184.836556 184.836556,192 176,192 L152,192 C143.163444,192 136,184.836556 136,176 L136,64 C136,55.163444 143.163444,48 152,48 Z"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 519 B |
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 9.3 KiB |
@@ -0,0 +1,117 @@
|
||||
(function (global) {
|
||||
'use strict';
|
||||
|
||||
const WIDTH = 256;
|
||||
const HEIGHT = 192;
|
||||
const MAX_BYTES = 1024 * 1024;
|
||||
const MAX_PAGES = 999;
|
||||
const SAMPLE_RATE = 32768;
|
||||
|
||||
function checkFile(buffer) {
|
||||
if (!(buffer instanceof ArrayBuffer) || buffer.byteLength < 0x6C0 || buffer.byteLength > MAX_BYTES) {
|
||||
throw new Error('Choose a complete Flipnote Studio PPM, no larger than 1,024 KB.');
|
||||
}
|
||||
const view = new DataView(buffer);
|
||||
if (view.getUint32(0, false) !== 0x50415241) throw new Error('That file is not a Flipnote Studio PPM.');
|
||||
const pages = view.getUint16(12, true) + 1;
|
||||
const animationEnd = 0x6A0 + view.getUint32(4, true);
|
||||
if (pages > MAX_PAGES || animationEnd < 0x6A8 || animationEnd + pages > buffer.byteLength) {
|
||||
throw new Error('The PPM page data is incomplete or exceeds 999 pages.');
|
||||
}
|
||||
const tableBytes = view.getUint16(0x6A0, true);
|
||||
const firstFrame = 0x6A8 + tableBytes;
|
||||
if (tableBytes < pages * 4 || firstFrame >= animationEnd) throw new Error('The PPM page table is invalid.');
|
||||
for (let index = 0; index < pages; index++) {
|
||||
if (firstFrame + view.getUint32(0x6A8 + index * 4, true) >= animationEnd) {
|
||||
throw new Error('A PPM page points outside the animation data.');
|
||||
}
|
||||
}
|
||||
const soundStart = Math.ceil((animationEnd + pages) / 4) * 4;
|
||||
if (soundStart + 32 + view.getUint32(8, true) > buffer.byteLength) {
|
||||
throw new Error('The PPM audio data is incomplete.');
|
||||
}
|
||||
let audioBytes = 0;
|
||||
for (let index = 0; index < 4; index++) audioBytes += view.getUint32(soundStart + index * 4, true);
|
||||
if (audioBytes > view.getUint32(8, true)) throw new Error('The PPM audio track lengths are invalid.');
|
||||
return pages;
|
||||
}
|
||||
|
||||
function base64(bytes) {
|
||||
let text = '';
|
||||
for (let offset = 0; offset < bytes.length; offset += 8192) {
|
||||
text += String.fromCharCode(...bytes.subarray(offset, offset + 8192));
|
||||
}
|
||||
return btoa(text);
|
||||
}
|
||||
|
||||
function layerData(pixels) {
|
||||
const bytes = new Uint8Array(WIDTH * HEIGHT / 8);
|
||||
for (let index = 0; index < pixels.length; index++) {
|
||||
if (pixels[index]) bytes[index >> 3] |= 1 << (index & 7);
|
||||
}
|
||||
return base64(bytes);
|
||||
}
|
||||
|
||||
function pcmWav(pcm) {
|
||||
const bytes = new Uint8Array(44 + pcm.length * 2);
|
||||
const view = new DataView(bytes.buffer);
|
||||
const text = (offset, value) => { for (let i = 0; i < value.length; i++) bytes[offset + i] = value.charCodeAt(i); };
|
||||
text(0, 'RIFF'); view.setUint32(4, bytes.length - 8, true); text(8, 'WAVE');
|
||||
text(12, 'fmt '); view.setUint32(16, 16, true); view.setUint16(20, 1, true);
|
||||
view.setUint16(22, 1, true); view.setUint32(24, SAMPLE_RATE, true);
|
||||
view.setUint32(28, SAMPLE_RATE * 2, true); view.setUint16(32, 2, true); view.setUint16(34, 16, true);
|
||||
text(36, 'data'); view.setUint32(40, pcm.length * 2, true);
|
||||
for (let i = 0; i < pcm.length; i++) view.setInt16(44 + i * 2, pcm[i], true);
|
||||
return bytes;
|
||||
}
|
||||
|
||||
function decode(buffer, filename = 'Flipnote.ppm') {
|
||||
checkFile(buffer);
|
||||
const parser = new global.flipnote.PpmParser(buffer);
|
||||
const flags = parser.decodeSoundFlags();
|
||||
const ink = index => index === 2 ? 'red' : index === 3 ? 'blue' : 'black';
|
||||
const frames = [];
|
||||
for (let index = 0; index < parser.frameCount; index++) {
|
||||
const layers = parser.decodeFrame(index);
|
||||
const palette = parser.getFramePaletteIndices(index);
|
||||
frames.push({
|
||||
layer1: layerData(layers[0]), layer2: layerData(layers[1]),
|
||||
colours: [ink(palette[1]), ink(palette[2])],
|
||||
paper: palette[0] === 1 ? 'black' : 'white',
|
||||
sounds: {sound1: flags[index][0], sound2: flags[index][1], sound3: flags[index][2]},
|
||||
});
|
||||
}
|
||||
const audio = {};
|
||||
const tracks = [['music', global.flipnote.FlipnoteAudioTrack.BGM],
|
||||
['sound1', global.flipnote.FlipnoteAudioTrack.SE1],
|
||||
['sound2', global.flipnote.FlipnoteAudioTrack.SE2],
|
||||
['sound3', global.flipnote.FlipnoteAudioTrack.SE3]];
|
||||
for (const [key, track] of tracks) {
|
||||
if (!parser.hasAudioTrack(track)) continue;
|
||||
const pcm = parser.getAudioTrackPcm(track, SAMPLE_RATE);
|
||||
if (!pcm.length) continue;
|
||||
audio[key] = {data: base64(pcmWav(pcm)), mime:'audio/wav', duration:pcm.length / SAMPLE_RATE,
|
||||
reference_fps:parser.framerate, source_name:filename, source_kind:'ppm_import'};
|
||||
}
|
||||
return {
|
||||
project: {
|
||||
title:String(filename).replace(/\.ppm$/i, '').slice(0, 32) || 'Imported Flipnote',
|
||||
speed_level:parser.frameSpeed, loop:parser.meta.loop,
|
||||
thumbnail_frame:Math.max(0, Math.min(frames.length - 1, parser.thumbFrameIndex)),
|
||||
layer_visibility:[parser.layerVisibility[1], parser.layerVisibility[2]], frames, audio,
|
||||
},
|
||||
source:{filename, original_author_name:parser.meta.current.username},
|
||||
};
|
||||
}
|
||||
|
||||
async function read(file) {
|
||||
if (!file || !/\.ppm$/i.test(file.name || '')) throw new Error('Choose a Flipnote Studio .PPM file.');
|
||||
if (file.size > MAX_BYTES) throw new Error('That PPM is larger than the 1,024 KB limit.');
|
||||
try { return decode(await file.arrayBuffer(), file.name); }
|
||||
catch (error) { throw new Error('Could not open this PPM: ' + (error.message || 'invalid file data')); }
|
||||
}
|
||||
|
||||
const api = Object.freeze({read, decode});
|
||||
global.FlipnotePpmImport = api;
|
||||
if (typeof module === 'object' && module.exports) module.exports = api;
|
||||
})(typeof window === 'object' ? window : globalThis);
|
||||
Vendored
+21
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2018 James Daniel
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
Vendored
+8232
File diff suppressed because it is too large.
Load diff
+550
@@ -0,0 +1,550 @@
|
||||
<!doctype html>
|
||||
<html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><meta name="theme-color" content="#ae301f"><title>Flipnote Editor</title><link rel="stylesheet" href="./assets/editor.css"></head><body class="experiments-page flipnote-editor-page flipnote-editor-loading"><main class="page-shell"><div id="flipnote-editor-loader" class="flipnote-editor-loader" role="status" aria-live="polite" aria-label="Loading Flipnote Editor">
|
||||
<div class="flipnote-editor-loader-inner">
|
||||
<img class="flipnote-editor-loader-spinner" src="./assets/loading.webp" alt="" aria-hidden="true" draggable="false">
|
||||
<div class="flipnote-editor-loader-copy" aria-hidden="true">
|
||||
<div class="flipnote-editor-loader-title">Loading Flipnote Editor</div>
|
||||
<div class="flipnote-editor-loader-subtext" data-flipnote-loader-status="">Preloading assets...</div>
|
||||
</div>
|
||||
<div class="flipnote-editor-loader-progress" role="progressbar" aria-label="Flipnote Editor preload progress" aria-valuemin="0" aria-valuemax="100" aria-valuenow="0">
|
||||
<div class="flipnote-editor-loader-progress-fill" data-flipnote-loader-progress=""></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="flipnote-editor-image-cache" class="flipnote-editor-image-cache" aria-hidden="true"></div>
|
||||
<style>
|
||||
.flipnote-editor-mobile-shift-toggle{position:fixed;left:max(12px,env(safe-area-inset-left));bottom:max(12px,env(safe-area-inset-bottom));z-index:99999;width:clamp(96px,24vw,132px);padding:0;border:0;background:transparent;box-shadow:0 4px 14px rgba(0,0,0,.38);border-radius:4px;line-height:0;touch-action:manipulation;-webkit-tap-highlight-color:transparent}
|
||||
.flipnote-editor-mobile-shift-toggle[hidden]{display:none!important}
|
||||
.flipnote-editor-mobile-shift-toggle img{display:block;width:100%;height:auto;pointer-events:none;user-select:none;-webkit-user-select:none}
|
||||
.flipnote-editor-mobile-shift-toggle:focus-visible{outline:3px solid #fff;outline-offset:3px}
|
||||
.flipnote-editor-mobile-shift-toggle[aria-pressed="true"]{box-shadow:0 0 0 2px #000,0 4px 14px rgba(0,0,0,.38)}
|
||||
|
||||
/* Keep the Open a Flipnote flow visually consistent with Import Music. */
|
||||
.flipnote-editor-open-ppm-dialog{width:min(820px,calc(100vw - 32px))}
|
||||
.flipnote-editor-open-ppm-body{display:flex;flex-direction:column;gap:0;min-height:0;padding:0;overflow:hidden}
|
||||
.flipnote-editor-open-ppm-step{flex:1 1 auto;min-height:0}
|
||||
.flipnote-editor-open-ppm-step[hidden]{display:none!important}
|
||||
#flipnote-open-ppm-choice{display:grid;gap:16px;padding:18px}
|
||||
.flipnote-editor-open-source-copy{display:grid;gap:5px;text-align:center}
|
||||
.flipnote-editor-open-source-copy strong{font-size:16px}
|
||||
.flipnote-editor-open-source-copy span{color:var(--muted);font-size:10px;line-height:1.5}
|
||||
.flipnote-editor-open-source-options{display:grid;grid-template-columns:1fr 1fr;gap:12px}
|
||||
.flipnote-editor-open-source-option{
|
||||
appearance:none;display:grid;grid-template-rows:auto auto 1fr;align-content:start;justify-items:start;gap:8px;
|
||||
min-height:158px;padding:16px;border:1px solid var(--line);border-radius:6px;background:var(--surface-raised);
|
||||
color:var(--text);font:inherit;text-align:left;text-decoration:none;cursor:pointer;user-select:none;
|
||||
transition:transform .11s cubic-bezier(.2,.8,.2,1),border-color .11s ease,background .11s ease,box-shadow .11s ease;
|
||||
}
|
||||
.flipnote-editor-open-source-option:hover,.flipnote-editor-open-source-option:focus-visible{transform:scale(1.012);border-color:var(--red);background:var(--surface-hover);box-shadow:0 7px 22px rgba(0,0,0,.13)}
|
||||
.flipnote-editor-open-source-option:active{transform:scale(.99)}
|
||||
.flipnote-editor-open-source-option:focus-visible{outline:2px solid var(--red);outline-offset:2px}
|
||||
.flipnote-editor-open-source-icon{display:grid;place-items:center;width:38px;height:38px;border:1px solid var(--line);border-radius:5px;background:var(--surface);font-size:22px;font-weight:900;line-height:1}
|
||||
.flipnote-editor-open-source-option strong{font-size:13px;line-height:1.3}
|
||||
.flipnote-editor-open-source-option small{color:var(--muted);font-size:9px;line-height:1.45}
|
||||
.flipnote-editor-open-ppm-status{margin:0 18px 14px;color:var(--muted);font-size:9px;line-height:1.45}
|
||||
.flipnote-editor-open-ppm-status:empty{display:none}
|
||||
@media(max-width:620px){
|
||||
.flipnote-editor-open-ppm-dialog{width:100%;max-height:calc(100vh - 20px)}
|
||||
.flipnote-editor-open-source-options{grid-template-columns:1fr}
|
||||
.flipnote-editor-open-source-option{min-height:130px}
|
||||
}
|
||||
|
||||
.flipnote-editor-open-source-options,.flipnote-editor-audio-import-source-options{grid-template-columns:1fr}
|
||||
</style>
|
||||
<button type="button" id="flipnote-mobile-shift-toggle" class="flipnote-editor-mobile-shift-toggle" aria-label="Toggle Shift" aria-keyshortcuts="Shift" aria-pressed="false" title="Shift" hidden>
|
||||
<img src="./assets/flipnote-editor/shiftl.png" data-normal-src="./assets/flipnote-editor/shiftl.png" data-active-src="./assets/flipnote-editor/shiftl_active.png" alt="Shift / L" draggable="false">
|
||||
</button>
|
||||
<div class="flipnote-editor-workspace" data-legacy-flipnote-editor="">
|
||||
<h1 class="flipnote-editor-sr-only">Flipnote Editor</h1>
|
||||
<div id="flipnote-space-meter" class="flipnote-editor-space-meter" role="progressbar" aria-label="Flipnote Space" aria-valuemin="0" aria-valuemax="1048576" aria-valuenow="0">
|
||||
<span class="flipnote-editor-space-label" aria-hidden="true">Flipnote Space</span>
|
||||
<div class="flipnote-editor-space-bar" aria-hidden="true">
|
||||
<span id="flipnote-space-meter-fill" class="flipnote-editor-space-fill"></span>
|
||||
<img src="./assets/flipnote-editor/musicBarEmpty.png" alt="" draggable="false">
|
||||
</div>
|
||||
<span id="flipnote-space-meter-value" class="flipnote-editor-space-value" aria-hidden="true">0 KB</span>
|
||||
<span id="flipnote-space-status" class="flipnote-editor-sr-only" role="status" aria-live="polite"></span>
|
||||
</div>
|
||||
<main class="flipnote-editor-main">
|
||||
<section class="flipnote-editor-stage" aria-label="Flipnote canvas">
|
||||
<div class="flipnote-editor-canvas-wrap"><div class="flipnote-editor-canvas-surface"><canvas id="flipnote-canvas" width="256" height="192" class="pen1-cursor" tabindex="0" aria-label="Flipnote drawing canvas"></canvas><svg id="flipnote-editor-canvas-grid" class="flipnote-editor-canvas-grid" viewBox="0 0 256 192" preserveAspectRatio="none" aria-hidden="true" hidden /></div></div>
|
||||
<div class="flipnote-editor-stage-playback" aria-label="Playback controls">
|
||||
<div class="flipnote-editor-stage-control-grid flipnote-editor-stage-toolbar">
|
||||
<img class="flipnote-editor-stage-nav" id="first-frame" src="./assets/flipnote-editor/first-frame.png" alt="First page" title="Skip to First Page" draggable="false">
|
||||
<img class="flipnote-editor-stage-nav" id="prev-frame" src="./assets/flipnote-editor/previous-frame.png" alt="Previous page" title="Previous Page" draggable="false">
|
||||
<img class="flipnote-editor-stage-play-toggle" id="play-pause" src="./assets/flipnote-editor/play.png" alt="Play" title="Play" draggable="false">
|
||||
<img class="flipnote-editor-stage-nav" id="next-frame" src="./assets/flipnote-editor/next-frame.png" alt="Next page" title="Next Page" draggable="false">
|
||||
<img class="flipnote-editor-stage-nav" id="last-frame" src="./assets/flipnote-editor/last-frame.png" alt="Last page" title="Skip to Last Page" draggable="false">
|
||||
</div>
|
||||
</div>
|
||||
<div class="flipnote-editor-stage-speed-row" aria-label="Playback speed and loop controls">
|
||||
<div class="flipnote-editor-speed-control" id="flipnote-speed-control" role="slider" tabindex="0" aria-label="Flipnote speed" aria-valuemin="1" aria-valuemax="8" aria-valuenow="6" aria-valuetext="Speed 6, 11.986 FPS" title="Speed 6 · 11.986 FPS">
|
||||
<img id="flipnote-speed-image" src="./assets/flipnote-editor/speed6.png" width="940" height="200" alt="Speed 6" draggable="false">
|
||||
</div>
|
||||
<button type="button" class="flipnote-editor-loop-toggle" id="flipnote-loop-toggle" aria-pressed="true" title="Loop enabled">
|
||||
<img id="flipnote-loop-image" src="./assets/flipnote-editor/loop_enabled.png" width="300" height="200" alt="Loop" draggable="false">
|
||||
</button>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div class="flipnote-editor-timeline-stack">
|
||||
<section class="flipnote-editor-filmstrip" aria-label="Flipnote timeline">
|
||||
<div id="timeline-container" class="flipnote-editor-timeline"></div>
|
||||
</section>
|
||||
<div id="flipnote-page-tools-tray" class="flipnote-editor-page-tools-tray" aria-label="Page Tools" aria-hidden="true">
|
||||
<button type="button" class="flipnote-editor-page-tool-button" id="flipnote-page-erase" title="Remove Page" aria-label="Remove Page"><img src="./assets/flipnote-editor/pageErase.png" alt="" draggable="false"></button>
|
||||
<button type="button" class="flipnote-editor-page-tool-button" id="flipnote-page-insert" title="Insert Page" aria-label="Insert Page"><img src="./assets/flipnote-editor/pageInsert.png" alt="" draggable="false"></button>
|
||||
<button type="button" class="flipnote-editor-page-tool-button" id="flipnote-page-copy" title="Copy Page" aria-label="Copy Page"><img src="./assets/flipnote-editor/pageCopy.png" alt="" draggable="false"></button>
|
||||
<button type="button" class="flipnote-editor-page-tool-button" id="flipnote-page-paste" title="Paste Page" aria-label="Paste Page"><img src="./assets/flipnote-editor/pagePaste.png" alt="" draggable="false"></button>
|
||||
</div>
|
||||
<button type="button" id="flipnote-page-tools-toggle" class="flipnote-editor-page-tools-toggle" aria-expanded="false" aria-controls="flipnote-page-tools-tray" title="Open Page Tools">
|
||||
<img id="flipnote-page-tools-toggle-image" src="./assets/flipnote-editor/openpages.png" alt="Open Page Tools" draggable="false">
|
||||
</button>
|
||||
</div>
|
||||
<div class="flipnote-editor-version-row">
|
||||
<div class="flipnote-editor-version">flipnote-editor v3.26.2</div>
|
||||
<button type="button" id="flipnote-editor-info-button" class="flipnote-editor-info-button" aria-label="Flipnote Editor settings" title="Flipnote Editor settings">⚙</button>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<aside class="flipnote-editor-controls" aria-label="Flipnote Editor controls">
|
||||
<div class="flipnote-editor-side-top" aria-label="Page controls">
|
||||
<div class="flipnote-editor-page-actions" aria-label="Page management">
|
||||
<img class="flipnote-editor-icon" id="delete-frame" src="./assets/flipnote-editor/delete-frame.png" alt="Remove page" title="Remove Page" draggable="false">
|
||||
<img class="flipnote-editor-icon" id="new-frame" src="./assets/flipnote-editor/new-frame.png" alt="Insert new page" title="Insert New Page" draggable="false">
|
||||
</div>
|
||||
<div class="flipnote-editor-history-undo-redo" aria-label="Undo and redo">
|
||||
<img class="flipnote-editor-history-icon" id="undoButton" src="./assets/flipnote-editor/undo_grey.png" width="480" height="300" alt="Undo" aria-disabled="true" title="Undo (U)" draggable="false">
|
||||
<img class="flipnote-editor-history-icon" id="redoButton" src="./assets/flipnote-editor/redo_grey.png" width="160" height="300" alt="Redo" aria-disabled="true" title="Redo (R)" draggable="false">
|
||||
</div>
|
||||
<img class="flipnote-editor-history-icon flipnote-editor-history-clear" id="eraseBigButton" src="./assets/flipnote-editor/erasebig.png" width="520" height="300" alt="Clear active layer" title="Clear Active Layer (C)" draggable="false">
|
||||
<div class="flipnote-editor-page-counter"><span>Page</span><strong id="frame-counter">1 / 1</strong></div>
|
||||
</div>
|
||||
|
||||
<div class="flipnote-editor-tool-tabs" role="tablist" aria-label="Flipnote tool pages">
|
||||
<button type="button" class="flipnote-editor-tool-tab active" data-tool-tab="1" data-tab-normal-src="./assets/flipnote-editor/tab1.png" data-tab-selected-src="./assets/flipnote-editor/tab1_selected.png" role="tab" aria-selected="true" aria-controls="flipnote-tool-tab-1" title="Tools & Brushes"><img src="./assets/flipnote-editor/tab1_selected.png" width="400" height="300" alt="Tab 1" draggable="false"></button>
|
||||
<button type="button" class="flipnote-editor-tool-tab" data-tool-tab="2" data-tab-normal-src="./assets/flipnote-editor/tab2.png" data-tab-selected-src="./assets/flipnote-editor/tab2_selected.png" role="tab" aria-selected="false" aria-controls="flipnote-tool-tab-2" title="Colour & Layering"><img src="./assets/flipnote-editor/tab2.png" width="400" height="300" alt="Tab 2" draggable="false"></button>
|
||||
<button type="button" class="flipnote-editor-tool-tab" data-tool-tab="3" data-tab-normal-src="./assets/flipnote-editor/tab3.png" data-tab-selected-src="./assets/flipnote-editor/tab3_selected.png" role="tab" aria-selected="false" aria-controls="flipnote-tool-tab-3" title="Selection & Movement"><img src="./assets/flipnote-editor/tab3.png" width="400" height="300" alt="Tab 3" draggable="false"></button>
|
||||
<button type="button" class="flipnote-editor-tool-tab" data-tool-tab="4" data-tab-normal-src="./assets/flipnote-editor/tab4.png" data-tab-selected-src="./assets/flipnote-editor/tab4_selected.png" role="tab" aria-selected="false" aria-controls="flipnote-tool-tab-4" title="Sound & Photos"><img src="./assets/flipnote-editor/tab4.png" width="400" height="300" alt="Tab 4" draggable="false"></button>
|
||||
<button type="button" class="flipnote-editor-tool-tab" data-tool-tab="5" data-tab-normal-src="./assets/flipnote-editor/tab5.png" data-tab-selected-src="./assets/flipnote-editor/tab5_selected.png" role="tab" aria-selected="false" aria-controls="flipnote-tool-tab-5" title="File & Options"><img src="./assets/flipnote-editor/tab5.png" width="400" height="300" alt="Tab 5" draggable="false"></button>
|
||||
</div>
|
||||
|
||||
<div class="flipnote-editor-tool-page" id="flipnote-tool-tab-1" data-tool-tab-pane="1" role="tabpanel">
|
||||
<div class="flipnote-editor-tool-picker-inline" aria-label="Drawing tools">
|
||||
<div class="flipnote-editor-tool-family-row" aria-label="Drawing tool families">
|
||||
<button type="button" class="flipnote-editor-tool-family" data-tool-family-picker="pen" aria-expanded="false" aria-controls="flipnote-tool-slots" title="Draw (P)">
|
||||
<img src="./assets/flipnote-editor/Draw.png" data-normal-src="./assets/flipnote-editor/Draw.png" data-selected-src="./assets/flipnote-editor/Draw_selected.png" width="800" height="640" alt="Draw" draggable="false">
|
||||
</button>
|
||||
<button type="button" class="flipnote-editor-tool-family" data-tool-family-picker="paint" aria-expanded="false" aria-controls="flipnote-tool-slots" title="Paint (B)">
|
||||
<img src="./assets/flipnote-editor/Paint.png" data-normal-src="./assets/flipnote-editor/Paint.png" data-selected-src="./assets/flipnote-editor/Paint_selected.png" width="800" height="640" alt="Paint" draggable="false">
|
||||
</button>
|
||||
<button type="button" class="flipnote-editor-tool-family" data-tool-family-picker="fill" aria-expanded="false" aria-controls="flipnote-tool-slots" title="Fill (F)">
|
||||
<img src="./assets/flipnote-editor/fill.png" data-normal-src="./assets/flipnote-editor/fill.png" data-selected-src="./assets/flipnote-editor/fill_selected.png" width="800" height="640" alt="Fill" draggable="false">
|
||||
</button>
|
||||
<button type="button" class="flipnote-editor-tool-family" data-tool-family-picker="eraser" aria-expanded="false" aria-controls="flipnote-tool-slots" title="Erase (E)">
|
||||
<img src="./assets/flipnote-editor/Erase.png" data-normal-src="./assets/flipnote-editor/Erase.png" data-selected-src="./assets/flipnote-editor/Erase_selected.png" width="800" height="640" alt="Erase" draggable="false">
|
||||
</button>
|
||||
</div>
|
||||
<div class="flipnote-editor-tool-lower-row">
|
||||
<div id="flipnote-tool-slots" class="flipnote-editor-tool-slots" role="group" aria-label="Drawing tool choices" hidden>
|
||||
<button type="button" data-tool-slot="0" aria-label="Tool 1"><img alt="" draggable="false"></button>
|
||||
<button type="button" data-tool-slot="1" aria-label="Tool 2"><img alt="" draggable="false"></button>
|
||||
<button type="button" data-tool-slot="2" aria-label="Tool 3"><img alt="" draggable="false"></button>
|
||||
<button type="button" data-tool-slot="3" aria-label="Tool 4"><img alt="" draggable="false"></button>
|
||||
<button type="button" data-tool-slot="4" aria-label="Tool 5"><img alt="" draggable="false"></button>
|
||||
<button type="button" data-tool-slot="5" aria-label="Tool 6"><img alt="" draggable="false"></button>
|
||||
<button type="button" data-tool-slot="6" aria-label="Tool 7"><img alt="" draggable="false"></button>
|
||||
<button type="button" data-tool-slot="7" aria-label="Tool 8"><img alt="" draggable="false"></button>
|
||||
</div>
|
||||
<button type="button" id="flipnote-edit-pattern" class="flipnote-editor-edit-pattern" hidden aria-label="Edit Pattern" title="Edit Pattern"><img src="./assets/flipnote-editor/editpattern.png" alt="Edit Pattern" draggable="false"></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="flipnote-pattern-modal" class="flipnote-editor-pattern-modal" hidden>
|
||||
<div class="flipnote-editor-pattern-dialog" role="dialog" aria-modal="true" aria-labelledby="flipnote-pattern-title">
|
||||
<div class="flipnote-editor-pattern-header">
|
||||
<strong id="flipnote-pattern-title">Edit Custom Paint Pattern</strong>
|
||||
<button type="button" id="flipnote-pattern-close" class="flipnote-editor-pattern-close" aria-label="Close pattern editor">×</button>
|
||||
</div>
|
||||
<div class="flipnote-editor-pattern-body">
|
||||
<p>Click or drag across the 8×8 grid. Black cells are painted; white cells are transparent.</p>
|
||||
<div id="flipnote-pattern-grid" class="flipnote-editor-pattern-grid" role="grid" aria-label="8 by 8 custom paint pattern"></div>
|
||||
<div class="flipnote-editor-pattern-actions-secondary">
|
||||
<button type="button" id="flipnote-pattern-clear">Clear</button>
|
||||
<button type="button" id="flipnote-pattern-fill">Fill</button>
|
||||
<button type="button" id="flipnote-pattern-invert">Invert</button>
|
||||
<button type="button" id="flipnote-pattern-reset">Reset</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flipnote-editor-pattern-footer">
|
||||
<button type="button" id="flipnote-pattern-cancel">Cancel</button>
|
||||
<button type="button" id="flipnote-pattern-save" class="flipnote-editor-pattern-save">Save Pattern</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flipnote-editor-tool-page" id="flipnote-tool-tab-2" data-tool-tab-pane="2" role="tabpanel" hidden>
|
||||
<section class="flipnote-editor-control-panel flipnote-editor-layers-panel">
|
||||
<div class="flipnote-editor-control-title">Layers</div>
|
||||
<div class="flipnote-editor-control-body">
|
||||
<div class="flipnote-editor-layer-stack" aria-label="Page layers">
|
||||
<div class="flipnote-editor-layer-row active" data-layer-row="0">
|
||||
<button type="button" class="flipnote-editor-layer-select" data-layer-select="0" aria-pressed="true" aria-label="Select Layer 1">
|
||||
<strong>Layer 1</strong><small data-layer-status="">Active</small>
|
||||
</button>
|
||||
<div class="flipnote-editor-layer-colors" aria-label="Layer 1 colour" aria-expanded="false">
|
||||
<button type="button" class="flipnote-editor-layer-color ink-black selected" data-layer="0" data-layer-color="black" aria-label="Layer 1 black" aria-pressed="true" title="Black"></button>
|
||||
<button type="button" class="flipnote-editor-layer-color ink-red" data-layer="0" data-layer-color="red" aria-label="Layer 1 red" aria-pressed="false" title="Red"></button>
|
||||
<button type="button" class="flipnote-editor-layer-color ink-blue" data-layer="0" data-layer-color="blue" aria-label="Layer 1 blue" aria-pressed="false" title="Blue"></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flipnote-editor-layer-row" data-layer-row="1">
|
||||
<button type="button" class="flipnote-editor-layer-select" data-layer-select="1" aria-pressed="false" aria-label="Select Layer 2">
|
||||
<strong>Layer 2</strong><small data-layer-status="">Select</small>
|
||||
</button>
|
||||
<div class="flipnote-editor-layer-colors" aria-label="Layer 2 colour" aria-expanded="false">
|
||||
<button type="button" class="flipnote-editor-layer-color ink-black" data-layer="1" data-layer-color="black" aria-label="Layer 2 black" aria-pressed="false" title="Black"></button>
|
||||
<button type="button" class="flipnote-editor-layer-color ink-red selected" data-layer="1" data-layer-color="red" aria-label="Layer 2 red" aria-pressed="true" title="Red"></button>
|
||||
<button type="button" class="flipnote-editor-layer-color ink-blue" data-layer="1" data-layer-color="blue" aria-label="Layer 2 blue" aria-pressed="false" title="Blue"></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="flipnote-editor-control-panel flipnote-editor-paper-panel">
|
||||
<div class="flipnote-editor-control-title">Paper Tools</div>
|
||||
<div class="flipnote-editor-control-body">
|
||||
<div class="flipnote-editor-paper-tools" aria-label="Paper tools">
|
||||
<button type="button" class="flipnote-editor-paper-tool" id="paper-tool" aria-pressed="false" title="Paper: White (click for black)"><img src="./assets/flipnote-editor/paperW.png" width="480" height="640" alt="White paper" draggable="false"></button>
|
||||
<button type="button" class="flipnote-editor-paper-tool" id="lightbox-tool" aria-pressed="false" title="Light-box"><img src="./assets/flipnote-editor/lightbox.png" width="480" height="640" alt="Light-box" draggable="false"></button>
|
||||
<button type="button" class="flipnote-editor-paper-tool" id="clone-tool" aria-pressed="false" title="Clone"><img src="./assets/flipnote-editor/copy.png" width="480" height="640" alt="Clone" draggable="false"></button>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<div class="flipnote-editor-tool-page flipnote-editor-selection-page" id="flipnote-tool-tab-3" data-tool-tab-pane="3" role="tabpanel" hidden>
|
||||
<div class="flipnote-editor-selection-tools" aria-label="Selection tools">
|
||||
<img class="flipnote-editor-selection-base" data-selection-base="" data-base-url="./assets/flipnote-editor/selbase.png" alt="" draggable="false" aria-hidden="true" hidden>
|
||||
<button type="button" class="flipnote-editor-paper-tool flipnote-editor-selection-tool" id="select-tool" aria-pressed="false" title="Select"><img src="./assets/flipnote-editor/select.png" data-idle-url="./assets/flipnote-editor/select.png" data-active-url="./assets/flipnote-editor/select_y.png" data-active-fallback-url="./assets/flipnote-editor/select_pressed.png" width="480" height="640" alt="Select" draggable="false"></button>
|
||||
<button type="button" class="flipnote-editor-paper-tool flipnote-editor-selection-tool" id="copy-tool" aria-disabled="true" title="Copy selection"><img src="./assets/flipnote-editor/selectionCopy.png" data-copy-url="./assets/flipnote-editor/selectionCopy.png" data-cut-url="./assets/flipnote-editor/selectionCut.png" width="480" height="640" alt="Copy" draggable="false"></button>
|
||||
<button type="button" class="flipnote-editor-paper-tool flipnote-editor-selection-tool" id="paste-tool" aria-disabled="true" title="Paste clipboard"><img src="./assets/flipnote-editor/paste.png" width="480" height="640" alt="Paste" draggable="false"></button>
|
||||
</div>
|
||||
<div class="flipnote-editor-selection-actions" aria-label="Selection actions">
|
||||
<button type="button" class="flipnote-editor-paper-tool flipnote-editor-selection-action" id="transform-tool" aria-pressed="false" title="Rectangle selection"><img src="./assets/flipnote-editor/transform.png" alt="Transform" draggable="false"></button>
|
||||
<button type="button" class="flipnote-editor-paper-tool flipnote-editor-selection-action" id="invert-tool" disabled title="Invert selection"><img src="./assets/flipnote-editor/invert.png" alt="Invert" draggable="false"></button>
|
||||
</div>
|
||||
<div class="flipnote-editor-more-tools" aria-label="More tools">
|
||||
<button type="button" class="flipnote-editor-paper-tool flipnote-editor-more-tool" id="resize-tool" title="Shrink"><img src="./assets/flipnote-editor/resize_smaller.png" data-normal-url="./assets/flipnote-editor/resize_smaller.png" data-shift-url="./assets/flipnote-editor/resize_larger.png" width="768" height="1024" alt="Shrink" draggable="false"></button>
|
||||
<button type="button" class="flipnote-editor-paper-tool flipnote-editor-more-tool" id="flip-tool" title="Flip horizontally"><img src="./assets/flipnote-editor/flip_x.png" data-normal-url="./assets/flipnote-editor/flip_x.png" data-shift-url="./assets/flipnote-editor/flip_y.png" width="768" height="1024" alt="Flip horizontally" draggable="false"></button>
|
||||
<button type="button" class="flipnote-editor-paper-tool flipnote-editor-more-tool" id="rotate-tool" title="Rotate clockwise"><img src="./assets/flipnote-editor/rotate_clockwise.png" data-normal-url="./assets/flipnote-editor/rotate_clockwise.png" data-shift-url="./assets/flipnote-editor/rotate_anticlockwise.png" width="1856" height="2475" alt="Rotate clockwise" draggable="false"></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flipnote-editor-tool-page flipnote-editor-audio-page" id="flipnote-tool-tab-4" data-tool-tab-pane="4" role="tabpanel" hidden>
|
||||
<div class="flipnote-editor-audio-layout" id="flipnote-editor-audio-layout" aria-label="Flipnote sound controls">
|
||||
<button type="button" class="flipnote-editor-audio-button flipnote-editor-audio-button-music" data-audio-control="music" data-record-src="./assets/flipnote-editor/musicRec.png" data-play-src="./assets/flipnote-editor/musicPlay.png" data-stop-src="./assets/flipnote-editor/musicStop.png" data-import-src="./assets/flipnote-editor/musicImportalt.png" title="Record Music. Hold Shift to import an MP3 or WAV.">
|
||||
<img src="./assets/flipnote-editor/musicRec.png" alt="Music" draggable="false">
|
||||
</button>
|
||||
<button type="button" id="flipnote-import-image-button" class="flipnote-editor-audio-button flipnote-editor-import-image-button" title="Import an image to the current Flipnote page" aria-label="Import image" aria-disabled="false">
|
||||
<img src="./assets/flipnote-editor/ImportImage.png" alt="Import Image" draggable="false">
|
||||
</button>
|
||||
<input id="flipnote-image-file-input" class="flipnote-editor-image-file-input" type="file" accept="image/png,image/jpeg,image/webp,image/gif,image/bmp">
|
||||
<div class="flipnote-editor-audio-meter flipnote-editor-audio-meter-music" data-audio-meter="music" aria-hidden="true">
|
||||
<span class="flipnote-editor-audio-meter-fill" data-audio-fill="music"></span>
|
||||
<img src="./assets/flipnote-editor/musicBarEmpty.png" alt="" draggable="false">
|
||||
</div>
|
||||
<button type="button" class="flipnote-editor-audio-erase flipnote-editor-audio-erase-music" data-audio-erase="music" title="Erase Music" aria-label="Erase Music" hidden>
|
||||
<img src="./assets/flipnote-editor/eraseaudio.png" alt="" draggable="false">
|
||||
</button>
|
||||
<button type="button" class="flipnote-editor-audio-button flipnote-editor-audio-button-sound flipnote-editor-audio-button-sound-1" data-audio-control="sound1" data-record-src="./assets/flipnote-editor/soundRecord1.png" data-play-src="./assets/flipnote-editor/soundPlay1.png" data-stop-src="./assets/flipnote-editor/soundStop1.png" data-import-src="./assets/flipnote-editor/soundImport1.png" data-import-alt-src="./assets/flipnote-editor/soundImport1alt.png" title="Record Sound 1. Hold Shift to import an MP3 or WAV.">
|
||||
<img src="./assets/flipnote-editor/soundRecord1.png" alt="Sound 1" draggable="false">
|
||||
</button>
|
||||
<div class="flipnote-editor-audio-meter flipnote-editor-audio-meter-sound flipnote-editor-audio-meter-sound-1" data-audio-meter="sound1" aria-hidden="true"><span class="flipnote-editor-audio-meter-fill" data-audio-fill="sound1"></span><img src="./assets/flipnote-editor/soundBarEmpry.png" alt="" draggable="false"></div>
|
||||
<button type="button" class="flipnote-editor-audio-erase flipnote-editor-audio-erase-sound flipnote-editor-audio-erase-sound-1" data-audio-erase="sound1" title="Erase Sound 1" aria-label="Erase Sound 1" hidden><img src="./assets/flipnote-editor/eraseaudio.png" alt="" draggable="false"></button>
|
||||
<button type="button" class="flipnote-editor-audio-button flipnote-editor-audio-button-sound flipnote-editor-audio-button-sound-2" data-audio-control="sound2" data-record-src="./assets/flipnote-editor/soundRecord2.png" data-play-src="./assets/flipnote-editor/soundPlay2.png" data-stop-src="./assets/flipnote-editor/soundStop2.png" data-import-src="./assets/flipnote-editor/soundImport2.png" data-import-alt-src="./assets/flipnote-editor/soundImport2alt.png" title="Record Sound 2. Hold Shift to import an MP3 or WAV.">
|
||||
<img src="./assets/flipnote-editor/soundRecord2.png" alt="Sound 2" draggable="false">
|
||||
</button>
|
||||
<div class="flipnote-editor-audio-meter flipnote-editor-audio-meter-sound flipnote-editor-audio-meter-sound-2" data-audio-meter="sound2" aria-hidden="true"><span class="flipnote-editor-audio-meter-fill" data-audio-fill="sound2"></span><img src="./assets/flipnote-editor/soundBarEmpry.png" alt="" draggable="false"></div>
|
||||
<button type="button" class="flipnote-editor-audio-erase flipnote-editor-audio-erase-sound flipnote-editor-audio-erase-sound-2" data-audio-erase="sound2" title="Erase Sound 2" aria-label="Erase Sound 2" hidden><img src="./assets/flipnote-editor/eraseaudio.png" alt="" draggable="false"></button>
|
||||
<button type="button" class="flipnote-editor-audio-button flipnote-editor-audio-button-sound flipnote-editor-audio-button-sound-3" data-audio-control="sound3" data-record-src="./assets/flipnote-editor/soundRecord3.png" data-play-src="./assets/flipnote-editor/soundPlay3.png" data-stop-src="./assets/flipnote-editor/soundStop3.png" data-import-src="./assets/flipnote-editor/soundImport3.png" data-import-alt-src="./assets/flipnote-editor/soundImport3alt.png" title="Record Sound 3. Hold Shift to import an MP3 or WAV.">
|
||||
<img src="./assets/flipnote-editor/soundRecord3.png" alt="Sound 3" draggable="false">
|
||||
</button>
|
||||
<div class="flipnote-editor-audio-meter flipnote-editor-audio-meter-sound flipnote-editor-audio-meter-sound-3" data-audio-meter="sound3" aria-hidden="true"><span class="flipnote-editor-audio-meter-fill" data-audio-fill="sound3"></span><img src="./assets/flipnote-editor/soundBarEmpry.png" alt="" draggable="false"></div>
|
||||
<button type="button" class="flipnote-editor-audio-erase flipnote-editor-audio-erase-sound flipnote-editor-audio-erase-sound-3" data-audio-erase="sound3" title="Erase Sound 3" aria-label="Erase Sound 3" hidden><img src="./assets/flipnote-editor/eraseaudio.png" alt="" draggable="false"></button>
|
||||
<div class="flipnote-editor-volume-monitor" id="flipnote-audio-volume-monitor" role="img" aria-label="Live Flipnote audio volume history">
|
||||
<img class="flipnote-editor-volume-monitor-base" src="./assets/flipnote-editor/base.png" alt="" draggable="false">
|
||||
<div class="flipnote-editor-volume-monitor-history" id="flipnote-audio-volume-history" aria-hidden="true"></div>
|
||||
</div>
|
||||
<input id="flipnote-audio-file-input" type="file" accept=".mp3,.wav,audio/mpeg,audio/wav,audio/x-wav" hidden>
|
||||
<span id="flipnote-audio-status" class="flipnote-editor-sr-only" role="status" aria-live="polite"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flipnote-editor-tool-page flipnote-editor-tab5-page" id="flipnote-tool-tab-5" data-tool-tab-pane="5" role="tabpanel" hidden>
|
||||
<section class="flipnote-editor-control-panel flipnote-editor-title-panel">
|
||||
<div class="flipnote-editor-control-title">Title</div>
|
||||
<div class="flipnote-editor-control-body">
|
||||
<div id="filename" class="flipnote-editor-title-field" title="Click to edit Flipnote title">Untitled flipnote</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
<div class="flipnote-editor-tab5-actions" aria-label="Open and export Flipnote">
|
||||
|
||||
<button type="button" id="export-btn" class="flipnote-editor-tab5-image-button" title="Save Flipnote as .WEBM">
|
||||
<img src="./assets/flipnote-editor/downloadwebm.png" alt="Save .WEBM" draggable="false">
|
||||
</button>
|
||||
<button type="button" id="flipnote-open-ppm-button" class="flipnote-editor-tab5-image-button" title="Open a Flipnote">
|
||||
<img src="./assets/flipnote-editor/openppm.png" alt="Open .PPM" draggable="false">
|
||||
</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
</div>
|
||||
|
||||
<div id="flipnote-editor-info-modal" class="flipnote-editor-info-modal" hidden>
|
||||
<div class="flipnote-editor-info-dialog" role="dialog" aria-modal="true" aria-labelledby="flipnote-editor-info-title">
|
||||
<header class="flipnote-editor-info-header">
|
||||
<div><strong id="flipnote-editor-info-title">Flipnote Editor settings</strong></div>
|
||||
<button type="button" id="flipnote-editor-info-close" aria-label="Close Flipnote Editor settings">×</button>
|
||||
</header>
|
||||
<div class="flipnote-editor-info-body">
|
||||
<section>
|
||||
<h3>What is Flipnote Editor?</h3>
|
||||
<p>Flipnote Editor is a browser-based Flipnote-style animation editor. It lets you draw 256×192 frame-by-frame animations with two ink layers, paper colours, DSi-style drawing tools, playback speed and looping, light-box/onion-skin helpers, music plus three sound-effect tracks, and WebM export.</p>
|
||||
<p><strong>Version:</strong> flipnote-editor v3.26.2</p>
|
||||
</section>
|
||||
<section>
|
||||
<h3>Canvas</h3>
|
||||
<label class="flipnote-editor-settings-toggle"><span>Show pixel grid <small>Available from 400% zoom</small></span><input id="flipnote-editor-show-grid" type="checkbox"></label>
|
||||
<label class="flipnote-editor-settings-zoom"><span>Zoom</span><input id="flipnote-editor-zoom" type="range" min="50" max="800" step="1" value="100"><output id="flipnote-editor-zoom-value" for="flipnote-editor-zoom">100%</output></label>
|
||||
<div><button type="button" class="button subtle" id="flipnote-editor-reset-view">Reset view to 100%</button></div>
|
||||
<label class="flipnote-editor-settings-toggle"><span>Zoom with Ctrl+scroll or trackpad pinch</span><input id="flipnote-editor-scroll-zoom" type="checkbox"></label>
|
||||
<label class="flipnote-editor-settings-toggle"><span>On-screen Shift button on desktop</span><input id="flipnote-editor-desktop-shift" type="checkbox"></label>
|
||||
<p>Hold Ctrl (or Command) and scroll to zoom towards the pointer. A trackpad pinch also zooms. Scroll normally to pan when zoomed in; Shift+scroll moves sideways. You can also drag with the middle mouse button.</p>
|
||||
</section>
|
||||
<section>
|
||||
<div class="flipnote-editor-settings-keyboard-heading"><h3>Keyboard shortcuts</h3><button type="button" id="flipnote-editor-reset-shortcuts" class="button subtle">Reset all</button></div>
|
||||
<p>Click a shortcut, then press one key or a modifier and a key. Changes are saved on this device. The Advanced / alternate actions shortcut is held while choosing alternate tools and selection actions; its default is Shift.</p>
|
||||
<div id="flipnote-editor-shortcut-settings" class="flipnote-editor-shortcut-settings"></div>
|
||||
<p id="flipnote-editor-shortcut-message" class="flipnote-editor-shortcut-message" role="status" aria-live="polite"></p>
|
||||
</section>
|
||||
<section>
|
||||
<h3>How the tools work</h3>
|
||||
<ul class="flipnote-editor-tricks">
|
||||
<li><strong>Audio buttons:</strong> while stopped, click an empty track to record it; click a filled track to preview it; click again while recording/previewing to stop. Hold Shift to switch the same buttons into import mode. Once a track has audio, its square erase-audio button appears without moving the meter: Music's is below its bar, while Sound 1–3 erase buttons sit just outside the sidebar to the right of their bars; click it to remove that track. Erasing Sound 1–3 also removes that sound's page triggers.</li>
|
||||
<li><strong>Music during playback:</strong> the Music track starts with the Flipnote from the current page position, stops with playback, and restarts from the beginning when a looping Flipnote wraps to page 1. Changing Flipnote speed also changes the Music track's tempo and pitch so it keeps the same page/frame alignment instead of being cut short or leaving silence.</li>
|
||||
<li><strong>Live sound effects:</strong> during playback, Sound 1–3 stay active. Click them or use their configured shortcuts to hear the sound immediately and attach it to the current page. On later playbacks, that page automatically fires its attached SE tracks. Sound 1–3 always play at their original recorded/imported speed and pitch, even when Flipnote speed changes; page trigger placement does not change.</li>
|
||||
<li><strong>Audio importing:</strong> hold Advanced / alternate actions (Shift by default) and click Music/Sound 1–3 to choose an MP3 or WAV from your device. The audio trimmer lets you choose a clip and preview it. For Music, <em>Automatically add frames to match this music</em> appends blank pages at the current speed, up to 999 pages. Each Sound track is limited to 2 seconds.</li>
|
||||
<li><strong>Tool picker:</strong> clicking Draw, Paint, Fill, or Erase immediately switches to that family's last chosen subtool and opens its submenu. After choosing a tool, its selected icon stays at the left of the picker. Click that retained icon to reopen the same family quickly. The Cycle drawing tools shortcut switches between the last-used Draw, Paint, Fill, and Erase tools without losing each family's slot or retained Advanced choice.</li>
|
||||
<li><strong>Advanced tools:</strong> hold Advanced / alternate actions (Shift by default) before choosing a Draw, Paint, or Erase slot. Fill has no Advanced bank.</li>
|
||||
<li><strong>Custom Paint:</strong> when the custom Paint tool is selected, use Edit Pattern to draw an 8×8 motif; click or drag across cells, then Save Pattern.</li>
|
||||
<li><strong>Layers & colour:</strong> click a layer row to make it active. Open its colour choices to use black, red, or blue ink independently per layer, or use the colour shortcut to cycle them. Clear active layer erases only the active layer on the current page. A configured nudge shortcut moves the whole active layer by exactly 1 pixel when there is no selection.</li>
|
||||
<li><strong>Selection & movement:</strong> on tab 3, Select draws a freehand selection; hold Advanced / alternate actions (Shift by default) while drawing to make a rectangle. Transform starts a rectangular selection or turns an existing freehand selection into its bounding rectangle. Drag its eight square handles to resize the selected artwork or the round handle above it to rotate. Hold the alternate-action key while dragging inside a selection to move its pixels. Copy changes to Cut while it is held, and Paste uses the copied selection shape. With a selection active, the configured nudge shortcuts move only that selected area by exactly 1 pixel. Invert swaps ink and erased pixels inside the selection on the active layer; hold the alternate-action key while clicking Invert to swap the two layers' ink only inside the selected area.</li>
|
||||
<li><strong>Resize / Flip / Rotate:</strong> these act only on the current layer. With a selection they transform only that selected area; without one they transform the whole active layer. Resize shrinks to 50%, or enlarges to 200% while the alternate-action key is held. Flip is horizontal, or vertical with that key. Rotate is clockwise, or anticlockwise with that key.</li>
|
||||
<li><strong>Paper:</strong> the Paper button toggles white/black paper; monochrome ink is interpreted against the chosen paper colour.</li>
|
||||
<li><strong>Light-box:</strong> toggle it to see previous page artwork while drawing the current page.</li>
|
||||
<li><strong>Clone:</strong> when Clone is enabled, inserting a page or advancing beyond the final page copies the current page's drawing and colours. With Clone off, a new page is blank but inherits the previous page's paper colour.</li>
|
||||
<li><strong>Timeline:</strong> click a thumbnail to jump directly to that page. During playback the filmstrip automatically follows the current page so the active thumbnail stays in view.</li>
|
||||
<li><strong>Page Tools:</strong> use the small Open Page Tools button beneath the timeline to reveal Remove Page, Insert Page, Copy Page, and Paste Page. Copy Page stores both drawing layers; Paste Page replaces both layers on the destination page with the copied page artwork. The toggle moves to the bottom of the open tray and changes to Close Page Tools.</li>
|
||||
<li><strong>Playback:</strong> use the configured Play / pause shortcut from anywhere in the editor except a text-entry field. Click or drag across the speed graphic to choose one of the eight Flipnote speed levels. Editing controls lock while the animation is running, but Sound 1–3 remain live for performance.</li>
|
||||
<li><strong>Import image:</strong> on tab 4, use Import Image to open the three-step importer. Step 1 accepts drag-and-drop, Upload, or clipboard paste (⌘V on Apple platforms, Ctrl+V elsewhere); Step 2 lets you crop the source; Step 3 can convert the crop into one ink colour on one layer, or quantize it into two chosen ink colours across both layers on the same page, with fit/fill/stretch/original sizing, alignment, threshold/dithering, invert, smoothing, and merge/replace options.</li>
|
||||
<li><strong>Loop:</strong> toggle the loop button beside the speed control before playback starts.</li>
|
||||
<li><strong>Title:</strong> click the title on tab 5 to edit it, then press Enter or click elsewhere to finish.</li>
|
||||
|
||||
</ul>
|
||||
</section>
|
||||
</div>
|
||||
<footer class="flipnote-editor-info-footer"><button type="button" id="flipnote-editor-info-done" class="button primary">Done</button></footer>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="flipnote-webm-export-modal" class="flipnote-editor-info-modal" hidden>
|
||||
<div class="flipnote-editor-info-dialog flipnote-editor-webm-export-dialog" role="dialog" aria-modal="true" aria-labelledby="flipnote-webm-export-title">
|
||||
<header class="flipnote-editor-info-header">
|
||||
<div><strong id="flipnote-webm-export-title">Save Flipnote as .WEBM</strong></div>
|
||||
<button type="button" id="flipnote-webm-export-close" aria-label="Close WEBM exporter">×</button>
|
||||
</header>
|
||||
<div class="flipnote-editor-info-body flipnote-editor-webm-export-body">
|
||||
<section><h3>WEBM video</h3><p>The editor will render the current Flipnote into a WEBM video in your browser and download it when rendering finishes.</p></section>
|
||||
<div class="flipnote-editor-export-thumbnail-picker">
|
||||
<strong class="flipnote-editor-export-thumbnail-label">Thumbnail:</strong>
|
||||
<div class="flipnote-editor-export-thumbnail-strip">
|
||||
<div id="flipnote-webm-export-thumbnail-timeline" class="flipnote-editor-export-thumbnail-timeline" aria-label="Choose Flipnote thumbnail page"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flipnote-editor-video-export-progress" id="flipnote-webm-export-progress" role="progressbar" aria-label="WEBM export progress" aria-valuemin="0" aria-valuemax="100" aria-valuenow="0"><span id="flipnote-webm-export-progress-fill"></span></div>
|
||||
<div class="flipnote-editor-video-export-status" id="flipnote-webm-export-status" role="status" aria-live="polite">Ready to render the current Flipnote.</div>
|
||||
</div>
|
||||
<footer class="flipnote-editor-info-footer flipnote-editor-video-export-footer">
|
||||
<button type="button" id="flipnote-webm-export-cancel" class="button subtle">Cancel</button>
|
||||
<button type="button" id="flipnote-webm-export-start" class="button primary">Save .WEBM</button>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="flipnote-open-ppm-modal" class="flipnote-editor-info-modal" hidden>
|
||||
<div class="flipnote-editor-info-dialog flipnote-editor-open-ppm-dialog" role="dialog" aria-modal="true" aria-labelledby="flipnote-open-ppm-title">
|
||||
<header class="flipnote-editor-info-header">
|
||||
<div><strong id="flipnote-open-ppm-title">Open a Flipnote</strong></div>
|
||||
<button type="button" id="flipnote-open-ppm-close" aria-label="Close Flipnote opener">×</button>
|
||||
</header>
|
||||
<div class="flipnote-editor-info-body flipnote-editor-open-ppm-body">
|
||||
<section id="flipnote-open-ppm-choice" class="flipnote-editor-open-ppm-step">
|
||||
<div class="flipnote-editor-open-source-copy">
|
||||
<strong>Open a Flipnote</strong>
|
||||
<span>Choose a PPM file from this device. It stays in your browser.</span>
|
||||
</div>
|
||||
<div class="flipnote-editor-open-source-options">
|
||||
|
||||
<label id="flipnote-open-upload" class="flipnote-editor-open-source-option" for="flipnote-import-ppm-input" role="button" tabindex="0">
|
||||
<span class="flipnote-editor-open-source-icon" aria-hidden="true">+</span>
|
||||
<strong>Upload a .PPM File</strong>
|
||||
<small>Open a Flipnote Studio PPM from this device.</small>
|
||||
</label>
|
||||
<input id="flipnote-import-ppm-input" type="file" accept=".ppm,application/octet-stream" hidden>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
<div id="flipnote-import-ppm-status" class="flipnote-editor-import-ppm-status flipnote-editor-open-ppm-status" role="status" aria-live="polite"></div>
|
||||
</div>
|
||||
<footer class="flipnote-editor-info-footer"><button type="button" id="flipnote-open-ppm-cancel" class="button subtle">Cancel</button></footer>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="flipnote-audio-trim-modal" class="flipnote-editor-audio-trim-modal" hidden>
|
||||
<div class="flipnote-editor-audio-trim-dialog" role="dialog" aria-modal="true" aria-labelledby="flipnote-audio-trim-title">
|
||||
<header class="flipnote-editor-audio-trim-header">
|
||||
<div><strong id="flipnote-audio-trim-title">Import audio</strong></div>
|
||||
<button type="button" id="flipnote-audio-trim-close" aria-label="Close audio importer">×</button>
|
||||
</header>
|
||||
|
||||
<section id="flipnote-audio-import-source-step" class="flipnote-editor-audio-import-step flipnote-editor-audio-import-source-step">
|
||||
<div id="flipnote-audio-import-source-copy" class="flipnote-editor-audio-import-source-copy">
|
||||
<strong>Choose where the audio comes from</strong>
|
||||
<span>Choose an MP3 or WAV from this device, then trim it before using it.</span>
|
||||
</div>
|
||||
<div id="flipnote-audio-import-source-options" class="flipnote-editor-audio-import-source-options">
|
||||
|
||||
<label id="flipnote-audio-import-upload" class="flipnote-editor-audio-import-source-option" for="flipnote-audio-file-input" role="button" tabindex="0">
|
||||
<span class="flipnote-editor-audio-import-source-icon" aria-hidden="true">+</span>
|
||||
<strong>Upload audio file (.wav/.mp3)</strong>
|
||||
<small>Choose an MP3 or WAV from this device, then trim it before using it.</small>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
<section id="flipnote-audio-trim-step" class="flipnote-editor-audio-import-step flipnote-editor-audio-trim-step" hidden>
|
||||
<div class="flipnote-editor-audio-trim-body">
|
||||
<div class="flipnote-editor-audio-trim-file"><strong id="flipnote-audio-trim-filename">Audio file</strong><span id="flipnote-audio-trim-limit"></span></div>
|
||||
<div class="flipnote-editor-audio-waveform-wrap"><canvas id="flipnote-audio-waveform" width="720" height="150" aria-label="Audio waveform"></canvas></div>
|
||||
<div class="flipnote-editor-audio-trim-volume">
|
||||
<div class="flipnote-editor-audio-trim-volume-label"><span>Preview volume</span><strong id="flipnote-audio-trim-volume-value">0%</strong></div>
|
||||
<div id="flipnote-audio-trim-volume-meter" class="flipnote-editor-audio-trim-volume-meter" role="meter" aria-label="Preview volume" aria-valuemin="0" aria-valuemax="100" aria-valuenow="0">
|
||||
<span id="flipnote-audio-trim-volume-fill" class="flipnote-editor-audio-trim-volume-fill"></span>
|
||||
<i class="flipnote-editor-audio-trim-volume-warning" aria-hidden="true"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flipnote-editor-audio-range-grid">
|
||||
<label><span>Start <b id="flipnote-audio-start-value">0.00s</b></span><input id="flipnote-audio-start" type="range" min="0" max="1" step="0.01" value="0"></label>
|
||||
<label><span>End <b id="flipnote-audio-end-value">0.00s</b></span><input id="flipnote-audio-end" type="range" min="0" max="1" step="0.01" value="1"></label>
|
||||
</div>
|
||||
<div class="flipnote-editor-audio-selection-summary"><span>Selected clip</span><strong id="flipnote-audio-selection-duration">0.00s</strong></div>
|
||||
<label id="flipnote-audio-auto-frames-option" class="flipnote-editor-audio-auto-frames" hidden>
|
||||
<input id="flipnote-audio-auto-frames" type="checkbox">
|
||||
<span class="flipnote-editor-audio-auto-frames-copy">
|
||||
<strong>Automatically add frames to match this music</strong>
|
||||
<small id="flipnote-audio-auto-frames-detail">Off: music stays limited to the current Flipnote length.</small>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<footer class="flipnote-editor-audio-trim-footer">
|
||||
<button type="button" id="flipnote-audio-trim-back" class="button subtle" hidden>Back</button>
|
||||
<button type="button" id="flipnote-audio-preview" class="button subtle" hidden>Preview clip</button>
|
||||
<span></span>
|
||||
<button type="button" id="flipnote-audio-trim-cancel" class="button subtle">Cancel</button>
|
||||
<button type="button" id="flipnote-audio-trim-save" class="button primary" hidden>Use clip</button>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="flipnote-image-import-modal" class="flipnote-editor-image-import-modal" hidden>
|
||||
<div class="flipnote-editor-image-import-dialog" role="dialog" aria-modal="true" aria-labelledby="flipnote-image-import-title">
|
||||
<header class="flipnote-editor-image-import-header">
|
||||
<div><strong id="flipnote-image-import-title">Import image</strong></div>
|
||||
<button type="button" id="flipnote-image-import-close" aria-label="Close image importer">×</button>
|
||||
</header>
|
||||
|
||||
<section id="flipnote-image-import-step-1" class="flipnote-editor-image-import-step flipnote-editor-image-import-step-source" data-image-import-step="1">
|
||||
<div class="flipnote-editor-image-import-source-copy">
|
||||
<strong>Choose an image</strong>
|
||||
<span>Drop an image here, upload one, or paste it from your clipboard.</span>
|
||||
</div>
|
||||
<div id="flipnote-image-import-dropzone" class="flipnote-editor-image-import-dropzone" tabindex="0" role="button" aria-label="Drop an image here or choose Upload image">
|
||||
<div class="flipnote-editor-image-import-drop-icon" aria-hidden="true">+</div>
|
||||
<strong>Drag & drop an image</strong>
|
||||
<span>PNG, JPEG, WebP, GIF or BMP</span>
|
||||
<span class="flipnote-editor-image-import-or">or</span>
|
||||
<label id="flipnote-image-import-upload" class="button primary" for="flipnote-image-file-input" role="button" tabindex="0">Upload image</label>
|
||||
<span class="flipnote-editor-image-import-paste">Paste with <kbd id="flipnote-image-import-paste-shortcut">Ctrl+V</kbd></span>
|
||||
</div>
|
||||
<div id="flipnote-image-import-source-status" class="flipnote-editor-image-import-source-status" role="status" aria-live="polite"></div>
|
||||
</section>
|
||||
|
||||
<section id="flipnote-image-import-step-2" class="flipnote-editor-image-import-step flipnote-editor-image-import-step-crop" data-image-import-step="2" hidden>
|
||||
<div class="flipnote-editor-image-import-file"><strong id="flipnote-image-import-filename">Image file</strong><span id="flipnote-image-import-dimensions"></span></div>
|
||||
<div class="flipnote-editor-image-import-crop-copy">Drag inside the crop to move it. Drag an edge or corner to resize.</div>
|
||||
<div class="flipnote-editor-image-import-crop-stage">
|
||||
<canvas id="flipnote-image-import-crop-canvas" width="720" height="480" aria-label="Crop image"></canvas>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section id="flipnote-image-import-step-3" class="flipnote-editor-image-import-step flipnote-editor-image-import-step-options" data-image-import-step="3" hidden>
|
||||
<div class="flipnote-editor-image-import-body">
|
||||
<div class="flipnote-editor-image-import-file"><strong id="flipnote-image-import-final-filename">Image file</strong><span id="flipnote-image-import-final-dimensions"></span></div>
|
||||
<div class="flipnote-editor-image-import-preview-wrap"><canvas id="flipnote-image-import-preview" width="256" height="192" aria-label="Image import preview"></canvas></div>
|
||||
<div class="flipnote-editor-image-import-options">
|
||||
<label><span>Colour mode</span><select id="flipnote-image-import-mode"><option value="single">1 colour / 1 layer</option><option value="dual">2 colours / both layers</option></select></label>
|
||||
<label><span>Ink colour</span><select id="flipnote-image-import-colour"><option value="black">Black</option><option value="red">Red</option><option value="blue">Blue</option></select></label>
|
||||
<label id="flipnote-image-import-second-colour-label" style="display:none"><span>Second ink colour</span><select id="flipnote-image-import-second-colour"><option value="black">Black</option><option value="red">Red</option><option value="blue">Blue</option></select></label>
|
||||
<label><span id="flipnote-image-import-layer-label">Layer</span><select id="flipnote-image-import-layer"><option value="0">Layer 1 (front)</option><option value="1">Layer 2 (back)</option></select></label>
|
||||
<label><span>Size</span><select id="flipnote-image-import-size"><option value="fit">Fit inside page</option><option value="fill">Fill page / crop</option><option value="stretch">Stretch to page</option><option value="original">Original pixels</option></select></label>
|
||||
<label><span>Position</span><select id="flipnote-image-import-align"><option value="center">Centre</option><option value="top-left">Top left</option><option value="top-right">Top right</option><option value="bottom-left">Bottom left</option><option value="bottom-right">Bottom right</option></select></label>
|
||||
<label><span>Dithering</span><select id="flipnote-image-import-dither"><option value="none">None</option><option value="bayer2">Bayer 2×2</option><option value="bayer4" selected>Bayer 4×4</option><option value="floyd">Floyd–Steinberg</option></select></label>
|
||||
<label class="flipnote-editor-image-import-threshold"><span>Threshold <b id="flipnote-image-import-threshold-value">128</b></span><input id="flipnote-image-import-threshold" type="range" min="0" max="255" step="1" value="128"></label>
|
||||
</div>
|
||||
<div class="flipnote-editor-image-import-toggles">
|
||||
<label><input id="flipnote-image-import-smoothing" type="checkbox" checked><span>Smooth resizing before conversion</span></label>
|
||||
<label><input id="flipnote-image-import-invert" type="checkbox"><span>Invert light and dark</span></label>
|
||||
<label><input id="flipnote-image-import-replace" type="checkbox" checked><span id="flipnote-image-import-replace-text">Replace the selected layer instead of merging</span></label>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<footer class="flipnote-editor-image-import-footer">
|
||||
<div class="flipnote-editor-image-import-footer-left">
|
||||
<button type="button" id="flipnote-image-import-back" class="button subtle" hidden>Back</button>
|
||||
<button type="button" id="flipnote-image-import-reset-crop" class="button subtle" hidden>Reset crop</button>
|
||||
</div>
|
||||
<span></span>
|
||||
<button type="button" id="flipnote-image-import-cancel" class="button subtle">Cancel</button>
|
||||
<button type="button" id="flipnote-image-import-next" class="button primary" hidden>Continue</button>
|
||||
<button type="button" id="flipnote-image-import-apply" class="button primary" hidden>Import</button>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
</main><script src="./assets/bootstrap.js"></script></body></html>
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"name": "flipnote-editor",
|
||||
"version": "3.26.2",
|
||||
"private": true,
|
||||
"description": "A standalone browser animation editor with two ink layers and local media import.",
|
||||
"license": "AGPL-3.0-only",
|
||||
"scripts": {
|
||||
"start": "node tools/serve.cjs",
|
||||
"test": "node --test tests/*.test.cjs"
|
||||
},
|
||||
"engines": {"node": ">=18"}
|
||||
}
|
||||
Vendored
BIN
Binary file not shown.
@@ -0,0 +1,80 @@
|
||||
const test = require('node:test');
|
||||
const assert = require('node:assert/strict');
|
||||
const fs = require('node:fs');
|
||||
const path = require('node:path');
|
||||
const vm = require('node:vm');
|
||||
const root = path.resolve(__dirname,'..');
|
||||
global.flipnote=vm.compileFunction(fs.readFileSync(path.join(root,'assets/vendor/flipnote.js'),'utf8')+'\nreturn flipnote;',['module'])(module);
|
||||
const importer = require('../assets/ppm-import.js');
|
||||
const fixture = fs.readFileSync(path.join(__dirname,'fixtures/local-import.ppm'));
|
||||
const buffer = bytes => bytes.buffer.slice(bytes.byteOffset, bytes.byteOffset + bytes.byteLength);
|
||||
const bit = (encoded,index) => (Buffer.from(encoded,'base64')[index >> 3] >> (index & 7)) & 1;
|
||||
|
||||
test('local import keeps both layers, per-page colours, paper and visibility',()=>{
|
||||
const result=importer.decode(buffer(fixture),'Local.ppm');
|
||||
assert.equal(result.project.frames.length,2);
|
||||
assert.equal(result.project.title,'Local');
|
||||
assert.deepEqual(result.project.layer_visibility,[true,false]);
|
||||
assert.deepEqual(result.project.frames.map(frame=>frame.colours),[['black','red'],['blue','black']]);
|
||||
assert.deepEqual(result.project.frames.map(frame=>frame.paper),['white','black']);
|
||||
assert.equal(bit(result.project.frames[0].layer1,0),1);
|
||||
assert.equal(bit(result.project.frames[0].layer2,191*256+255),1);
|
||||
assert.equal(bit(result.project.frames[1].layer1,7*256+7),1);
|
||||
assert.equal(bit(result.project.frames[1].layer1,0),0);
|
||||
assert.equal(bit(result.project.frames[1].layer2,10*256+10),1);
|
||||
assert.equal(result.project.loop,true);
|
||||
});
|
||||
|
||||
test('audio and page sound triggers stay with an imported animation',()=>{
|
||||
const {project}=importer.decode(buffer(fixture));
|
||||
assert.equal(project.speed_level,6);
|
||||
assert.deepEqual(project.frames[0].sounds,{sound1:true,sound2:false,sound3:false});
|
||||
assert.deepEqual(Object.keys(project.audio),['music','sound1']);
|
||||
for(const track of Object.values(project.audio)){
|
||||
const wav=Buffer.from(track.data,'base64');
|
||||
assert.equal(wav.toString('ascii',0,4),'RIFF');
|
||||
assert.equal(wav.readUInt32LE(24),32768);
|
||||
assert.equal(track.reference_fps,12);
|
||||
assert.equal(track.duration,(wav.length-44)/2/32768);
|
||||
}
|
||||
});
|
||||
|
||||
test('music pitch follows the stored Flipnote and music speeds exactly once',()=>{
|
||||
const normal=importer.decode(buffer(fixture));
|
||||
const fast=Buffer.from(fixture);
|
||||
const animationEnd=0x6A0+fast.readUInt32LE(4);
|
||||
const soundStart=Math.ceil((animationEnd+2)/4)*4;
|
||||
fast[soundStart+16]=1;
|
||||
const faster=importer.decode(buffer(fast));
|
||||
assert.equal(faster.project.speed_level,7);
|
||||
assert.equal(faster.project.audio.music.reference_fps,20);
|
||||
assert.ok(faster.project.audio.music.duration<normal.project.audio.music.duration);
|
||||
assert.equal(faster.project.audio.sound1.duration,normal.project.audio.sound1.duration);
|
||||
});
|
||||
|
||||
test('invalid lengths and out-of-bounds page tables are rejected before decoding',()=>{
|
||||
for(const mutate of [
|
||||
bytes=>bytes.fill(0,0,4),
|
||||
bytes=>bytes.writeUInt32LE(0xFFFFFFFF,4),
|
||||
bytes=>bytes.writeUInt16LE(1000,12),
|
||||
bytes=>bytes.writeUInt16LE(0,0x6A0),
|
||||
bytes=>bytes.writeUInt32LE(0xFFFFFFFF,0x6A8),
|
||||
bytes=>bytes.writeUInt32LE(0xFFFFFFFF,8),
|
||||
]){
|
||||
const bad=Buffer.from(fixture);mutate(bad);
|
||||
assert.throws(()=>importer.decode(buffer(bad)));
|
||||
}
|
||||
assert.throws(()=>importer.decode(buffer(fixture.subarray(0,100))));
|
||||
assert.throws(()=>importer.decode(new ArrayBuffer(1024*1024+1)));
|
||||
});
|
||||
|
||||
test('opening a device file uses its bytes without making a network request',async()=>{
|
||||
const oldFetch=global.fetch;
|
||||
global.fetch=()=>{throw new Error('Unexpected network request');};
|
||||
try{
|
||||
const result=await importer.read({name:'Device.ppm',size:fixture.length,arrayBuffer:async()=>buffer(fixture)});
|
||||
assert.equal(result.project.title,'Device');
|
||||
await assert.rejects(importer.read({name:'not-a-note.txt',size:fixture.length}));
|
||||
await assert.rejects(importer.read({name:'large.ppm',size:1024*1024+1}));
|
||||
}finally{global.fetch=oldFetch;}
|
||||
});
|
||||
@@ -0,0 +1,52 @@
|
||||
const test = require('node:test');
|
||||
const assert = require('node:assert/strict');
|
||||
const fs = require('node:fs');
|
||||
const path = require('node:path');
|
||||
const vm = require('node:vm');
|
||||
const root = path.resolve(__dirname,'..');
|
||||
const walk = directory => fs.readdirSync(directory,{withFileTypes:true}).flatMap(entry=>
|
||||
entry.isDirectory()?walk(path.join(directory,entry.name)):[path.join(directory,entry.name)]);
|
||||
|
||||
test('the release contains source files and assets, with no server credentials or nested bundles',()=>{
|
||||
for(const file of walk(root)){
|
||||
assert.doesNotMatch(path.relative(root,file),/\.(?:key|pem|sqlite3|zip|xpi|pyc)$/i);
|
||||
if(/\.(?:html|js|css|json|md|txt)$/i.test(file)){
|
||||
assert.doesNotMatch(fs.readFileSync(file,'utf8'),/-----BEGIN (?:RSA )?PRIVATE KEY-----/);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
test('all shipped JavaScript is valid and the editor has no server fetch calls',()=>{
|
||||
for(const file of walk(path.join(root,'assets')).filter(file=>file.endsWith('.js'))){
|
||||
const source=fs.readFileSync(file,'utf8');
|
||||
new vm.Script(source,{filename:file});
|
||||
if(!file.includes(path.join('assets','vendor'))&&!file.endsWith('arabic-text.js')){
|
||||
assert.doesNotMatch(source,/\bfetch\s*\(|XMLHttpRequest|sendBeacon|WebSocket/);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
test('the page keeps local import and video output without site navigation',()=>{
|
||||
const html=fs.readFileSync(path.join(root,'index.html'),'utf8');
|
||||
assert.match(html,/id="flipnote-open-ppm-button"/);
|
||||
assert.match(html,/id="flipnote-audio-file-input"/);
|
||||
assert.match(html,/id="export-btn"/);
|
||||
assert.doesNotMatch(html,/class="site-(?:header|footer)"|<nav\b|action="\//);
|
||||
assert.doesNotMatch(html,/__[A-Z][A-Z0-9_]+__/);
|
||||
});
|
||||
|
||||
test('all literal page images, scripts, styles and font URLs exist locally',()=>{
|
||||
const files=walk(root).filter(file=>/\.(?:html|css|js)$/.test(file)&&!file.includes(path.sep+'vendor'+path.sep));
|
||||
for(const file of files){
|
||||
const text=fs.readFileSync(file,'utf8');
|
||||
const references=[];
|
||||
for(const match of text.matchAll(/(?:src|href)=["'](\.\/[^"']+)["']/g))references.push(match[1]);
|
||||
for(const match of text.matchAll(/url\(["']?(\.\/[^)'"\s]+)["']?\)/g))references.push(match[1]);
|
||||
for(const match of text.matchAll(/["'](\.\/assets\/[^"'$`]+)["']/g))references.push(match[1]);
|
||||
for(const reference of references){
|
||||
const clean=reference.split(/[?#]/)[0];
|
||||
const base=file.endsWith('.css')?path.dirname(file):root;
|
||||
assert.ok(fs.existsSync(path.resolve(base,clean)),path.relative(root,file)+': missing '+clean);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,23 @@
|
||||
const http = require('node:http');
|
||||
const fs = require('node:fs');
|
||||
const path = require('node:path');
|
||||
const root = path.resolve(__dirname, '..');
|
||||
const port = Number(process.env.PORT || 8090);
|
||||
if (!Number.isInteger(port) || port < 1024 || port > 65535) throw new Error('Choose a port between 1024 and 65535.');
|
||||
const types = {'.html':'text/html; charset=utf-8','.js':'text/javascript; charset=utf-8','.css':'text/css; charset=utf-8',
|
||||
'.json':'application/json; charset=utf-8','.png':'image/png','.webp':'image/webp','.svg':'image/svg+xml',
|
||||
'.ttf':'font/ttf','.otf':'font/otf','.woff2':'font/woff2','.wav':'audio/wav'};
|
||||
http.createServer((req,res) => {
|
||||
try {
|
||||
if (!['GET','HEAD'].includes(req.method)) {res.writeHead(405,{'Allow':'GET, HEAD'}).end();return;}
|
||||
const pathname = decodeURIComponent(new URL(req.url,'http://localhost').pathname);
|
||||
const relative = pathname.replace(/^\/+/, '') || 'index.html';
|
||||
const target = path.resolve(root,relative);
|
||||
if (path.relative(root,target).startsWith('..') || path.isAbsolute(path.relative(root,target)) || relative.split(/[\\/]/).some(part=>part.startsWith('.'))) {res.writeHead(404).end();return;}
|
||||
const stat = fs.statSync(target);
|
||||
if (!stat.isFile()) {res.writeHead(404).end();return;}
|
||||
res.writeHead(200,{'Content-Type':types[path.extname(target)]||'application/octet-stream',
|
||||
'Content-Length':stat.size,'X-Content-Type-Options':'nosniff','Cache-Control':'no-cache'});
|
||||
if (req.method==='HEAD')res.end();else fs.createReadStream(target).pipe(res);
|
||||
} catch {res.writeHead(404).end();}
|
||||
}).listen(port,'127.0.0.1',()=>console.log(`Flipnote Editor: http://localhost:${port}`));
|
||||
Reference in new issue
Block a user
